HHH-8363 cleanup and formatting

This commit is contained in:
Brett Meyer 2013-09-05 15:07:31 -04:00 committed by Brett Meyer
parent 5011b4a30e
commit 3fdffcbcd4
1 changed files with 11 additions and 10 deletions

View File

@ -52,8 +52,9 @@ import org.jboss.logging.Logger;
public class ClassLoaderServiceImpl implements ClassLoaderService { public class ClassLoaderServiceImpl implements ClassLoaderService {
private static final Logger log = Logger.getLogger( ClassLoaderServiceImpl.class ); private static final Logger log = Logger.getLogger( ClassLoaderServiceImpl.class );
private final ClassLoader aggregatedClassLoader; private final AggregatedClassLoader aggregatedClassLoader;
private final LinkedList<ServiceLoader> loaders = new LinkedList<ServiceLoader>();
private final LinkedList<ServiceLoader> serviceLoaders = new LinkedList<ServiceLoader>();
/** /**
* Constructs a ClassLoaderServiceImpl with standard set-up * Constructs a ClassLoaderServiceImpl with standard set-up
@ -325,14 +326,14 @@ public class ClassLoaderServiceImpl implements ClassLoaderService {
for ( S service : serviceLoader ) { for ( S service : serviceLoader ) {
services.add( service ); services.add( service );
} }
loaders.add(serviceLoader); serviceLoaders.add( serviceLoader );
return services; return services;
} }
@Override @Override
public void stop() { public void stop() {
while (!loaders.isEmpty()){ while ( !serviceLoaders.isEmpty() ) {
ServiceLoader loader = loaders.removeLast(); ServiceLoader loader = serviceLoaders.removeLast();
loader.reload(); // clear service loader providers loader.reload(); // clear service loader providers
} }
} }