Skip to content

Commit 294ec7b

Browse files
authored
Merge pull request #4 from andrew-dixon/patch-1
Changing array of locations check
2 parents e1600fe + 443b62d commit 294ec7b

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)