Skip to content

Commit

Permalink
Merge pull request #1702 from jdahlstrom/master
Browse files Browse the repository at this point in the history
Handle different VFS protocols in AnnotationDetector (#1701)
  • Loading branch information
jfarcand committed Aug 26, 2014
2 parents 4b3e227 + 1328415 commit a9c2df1
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,8 @@ public final void detect(final String... packageNames) throws IOException {
// Handle JBoss VFS URL's which look like (example package 'nl.dvelop'):
// vfs:/foo/bar/website.war/WEB-INF/classes/nl/dvelop/
// vfs:/foo/bar/website.war/WEB-INF/lib/dwebcore-0.0.1.jar/nl/dvelop/
// On JBoss 5.1, the protocol of VFS URL is vfsfile, make it work on JBoss 5.1
final boolean isVfs = ("vfs".equals(url.getProtocol()) || "vfsfile".equals(url.getProtocol()));
// Different vfs protocols include vfs, vfsfile, vfszip, vfsjar, and vfsmemory
final boolean isVfs = url.getProtocol() != null && url.getProtocol().startsWith("vfs");
if ("file".equals(url.getProtocol()) || isVfs) {
final File dir = toFile(url);
if (dir.isDirectory()) {
Expand Down

0 comments on commit a9c2df1

Please sign in to comment.