From 1328415354bae65a2cc8e27887a6f42bf4d71be8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Dahlstr=C3=B6m?= Date: Tue, 26 Aug 2014 16:52:27 +0300 Subject: [PATCH] Handle different VFS protocols in AnnotationDetector (#1701) --- .../org/atmosphere/util/annotation/AnnotationDetector.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/cpr/src/main/java/org/atmosphere/util/annotation/AnnotationDetector.java b/modules/cpr/src/main/java/org/atmosphere/util/annotation/AnnotationDetector.java index 08b60c48cf6..82751230d38 100644 --- a/modules/cpr/src/main/java/org/atmosphere/util/annotation/AnnotationDetector.java +++ b/modules/cpr/src/main/java/org/atmosphere/util/annotation/AnnotationDetector.java @@ -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()) {