Skip to content

Commit

Permalink
Protect initServerProviders() method (#275)
Browse files Browse the repository at this point in the history
Protect initServerProviders() method
  • Loading branch information
jadelkhoury authored Dec 4, 2023
1 parent 5ddc73e commit 3e2143c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- Using depedency injection for Manager, Store and TRS classes
- Provide flexibility to for Store properties to be set via the Environment.
- Changing the way Resource and ResourceProperty items are represented in dialogs. We include prefixes to make their identification easier.
- Protect initServerProviders() method

### Deprecated

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,8 @@ public class [javaClassNameForSingleton(aServiceProviderCatalog) /]

public static ServiceProvider [ '[' ']' /] getServiceProviders(HttpServletRequest httpServletRequest)
{
synchronized(serviceProviders)
{
initServiceProviders(httpServletRequest);
return serviceProviders.values().toArray(new ServiceProvider[ '[' /] serviceProviders.size()[ ']' /]);
}
initServiceProviders(httpServletRequest);
return serviceProviders.values().toArray(new ServiceProvider[ '[' /] serviceProviders.size()[ ']' /]);
}

public static boolean containsServiceProvider(final String identifier) {
Expand Down Expand Up @@ -279,7 +276,7 @@ public class [javaClassNameForSingleton(aServiceProviderCatalog) /]
* creation to create unique URI paths for each ServiceProvider.
*
*/
protected static void initServiceProviders (HttpServletRequest httpServletRequest)
protected static synchronized void initServiceProviders (HttpServletRequest httpServletRequest)
{
try {
// [protected ('initServiceProviders')]
Expand Down

0 comments on commit 3e2143c

Please sign in to comment.