Skip to content

Commit

Permalink
HSEARCH-3384 Fix various comments in code imported from Search 5
Browse files Browse the repository at this point in the history
  • Loading branch information
yrodiere committed Oct 3, 2018
1 parent e633149 commit 62f495d
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import java.util.Iterator;

/**
* A classloader which keeps a ordered list of aggregated classloaders.
* A classloader which keeps an ordered list of aggregated classloaders.
*
* @author Steve Ebersole
* @author Hardy Ferentschik
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* Utility class to load instances of other classes by using a fully qualified name,
* or from a class type.
* Uses reflection and throws SearchException(s) with proper descriptions of the error,
* like the target class is missing a proper constructor, is an interface, is not found...
* such as the target class is missing a proper constructor, is an interface, is not found...
*
* @author Sanne Grinovero
* @author Hardy Ferentschik
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public interface ClassResolver {
/**
* Discovers and instantiates implementations of the named service contract.
* <p>
* NOTE : the terms service here is used differently than {@link Service}. Instead here we are talking about
* services as defined by {@link java.util.ServiceLoader}.
* NOTE : the term service here is used differently than {@link Service}.
* Instead here we are talking about services as defined by {@link java.util.ServiceLoader}.
*
* @param serviceContract The java type defining the service contract
* @param <T> The type of the service contract
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public interface ResourceResolver {
URL locateResource(String name);

/**
* Locate a resource by name (classpath lookup) and gets its stream.
* Locate a resource by name (classpath lookup) and get its stream.
*
* @param name The resource name.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@
*/
public class DelegatingClassLoaderService implements ClassLoaderService {
/**
* {@code ClassLoaderService] as provided by Hibernate ORM. This is the class loader which we attempt to use first.
* {@code ClassLoaderService} as provided by Hibernate ORM. This is the class loader which we attempt to use first.
*/
private final org.hibernate.boot.registry.classloading.spi.ClassLoaderService hibernateClassLoaderService;

/**
* A Search internal class loader service which in particular tries to use the current class loader. This can be
* necessary in case the ORM class loader can due to modularity not access the required resources
* A Search internal class loader service which in particular tries to use the current class loader.
* This can be necessary in modular environments (WildFly, ...)
* when the ORM class loader can not access the required resources, but the Search class loader can.
*/
private final ClassLoaderService internalClassLoaderService;

Expand Down Expand Up @@ -69,7 +70,7 @@ public InputStream locateResourceStream(String name) {

@Override
public <T> Iterable<T> loadJavaServices(Class<T> serviceContract) {
// when it comes to services, we need to search in both services and the de-duplicate
// when it comes to services, we need to search in both services and de-duplicate
// however, we cannot rely on 'equals' for comparison. Instead compare class names
Iterable<T> servicesFromORMCLassLoader = hibernateClassLoaderService.loadJavaServices( serviceContract );
Iterable<T> servicesFromLocalClassLoader = internalClassLoaderService.loadJavaServices( serviceContract );
Expand Down

0 comments on commit 62f495d

Please sign in to comment.