Skip to content

Commit 443b62d

Browse files
authored
Changing array of locations check
Changing the array of locations check so that it doesn't fail if a JAR file is passed in the array.
1 parent b2aed1d commit 443b62d

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

modules/cbjavaloader/ModuleConfig.cfc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,12 @@ component {
9696
if( isArray( javaLoaderDSL.loadPaths ) ){
9797
var aJarPaths = [];
9898
for( var thisLocation in javaLoaderDSL.loadPaths ){
99-
if( !directoryExists( thisLocation ) ){
100-
throw( "Cannot load #thisLocation# as it is not a valid path" );
99+
if( directoryExists( thisLocation ) ) {
100+
aJarPaths.addAll( getJars( thisLocation ) )
101+
} else if ( !fileExists( thisLocation ) ) {
102+
throw( "Cannot load #thisLocation# as it is not a valid path or file" );
101103
}
102-
aJarPaths.addAll( getJars( thisLocation ) );
103-
}
104+
}
104105
javaLoaderDSL.loadPaths = aJarPaths;
105106
}
106107
// Single directory? Get all Jars in it

0 commit comments

Comments
 (0)