Skip to content

Commit

Permalink
probably fix for MorphiaOrg#683
Browse files Browse the repository at this point in the history
I couldn't reproduce though the failure seems obvious enough to fix
  • Loading branch information
Justin Lee committed Mar 30, 2015
1 parent 6a906e6 commit 58e8c22
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ private static String stripFilenameExtension(final String filename) {
}

private static String getPackageName(final String filename) {
return filename.substring(0, filename.lastIndexOf('/'));
return filename.contains("/") ? filename.substring(0, filename.lastIndexOf('/')) : filename;
}

public static Set<Class<?>> getFromDirectory(final ClassLoader loader, final File directory, final String packageName)
Expand Down

0 comments on commit 58e8c22

Please sign in to comment.