File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
src/jorphan/org/apache/jorphan/reflect Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -203,14 +203,14 @@ private static String[] addJarsInPath(String[] paths) {
203
203
Set <String > fullList = new HashSet <>();
204
204
for (final String path : paths ) {
205
205
fullList .add (path ); // Keep the unexpanded path
206
- // TODO - allow directories to end with .jar by removing this check?
207
- if (! path . endsWith ( DOT_JAR )) {
208
- File dir = new File ( path );
209
- if ( dir . exists () && dir . isDirectory ()) {
210
- String [] jars = dir . list (( f , name ) -> name .endsWith (DOT_JAR ) );
211
- if ( jars != null ) {
212
- Collections . addAll ( fullList , jars );
213
- }
206
+ File dir = new File ( path );
207
+ if (dir . exists () && dir . isDirectory ( )) {
208
+ String [] jars = dir . list (( f , name ) -> {
209
+ File fileInDirectory = new File ( f , name );
210
+ return fileInDirectory . isFile () && name .endsWith (DOT_JAR );
211
+ });
212
+ if ( jars != null ) {
213
+ Collections . addAll ( fullList , jars );
214
214
}
215
215
}
216
216
}
You can’t perform that action at this time.
0 commit comments