Skip to content

Commit

Permalink
Fixed #2383: SQL*Plus @ with file path fails to load correct file
Browse files Browse the repository at this point in the history
  • Loading branch information
Axel Fontaine committed May 21, 2019
1 parent 6505a17 commit 6cb3c47
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -40,7 +40,7 @@ public class Scanner implements ResourceProvider, ClassProvider {
private static final Log LOG = LogFactory.getLog(Scanner.class);

private final List<LoadableResource> resources = new ArrayList<>();
private final List<Class<?>> classes = new ArrayList<Class<?>>();
private final List<Class<?>> classes = new ArrayList<>();

public Scanner(Collection<Location> locations, ClassLoader classLoader, Charset encoding

Expand Down Expand Up @@ -71,7 +71,7 @@ public Scanner(Collection<Location> locations, ClassLoader classLoader, Charset
@Override
public LoadableResource getResource(String name) {
for (LoadableResource resource : resources) {
String fileName = resource.getFilename();
String fileName = resource.getRelativePath();
if (fileName.equals(name)) {
return resource;
}
Expand Down Expand Up @@ -107,7 +107,7 @@ public Collection<LoadableResource> getResources(String prefix, String... suffix
* @return The non-abstract classes that were found.
*/
public <I> Collection<Class<? extends I>> getClasses(Class<I> implementedInterface) {
List<Class<? extends I>> result = new ArrayList<Class<? extends I>>();
List<Class<? extends I>> result = new ArrayList<>();
for (Class<?> clazz : classes) {
if (!implementedInterface.isAssignableFrom(clazz)) {
continue;
Expand Down

0 comments on commit 6cb3c47

Please sign in to comment.