Author: scabanovich
Date: 2012-05-16 21:12:26 -0400 (Wed, 16 May 2012)
New Revision: 41103
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/scanner/lib/ClassPathMonitor.java
Log:
JBIDE-11552
https://issues.jboss.org/browse/JBIDE-11552
File javax.enterprise.inject.spi.Extension can contain comments - lines that start with
#.
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/scanner/lib/ClassPathMonitor.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/scanner/lib/ClassPathMonitor.java 2012-05-16
23:47:31 UTC (rev 41102)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/internal/core/scanner/lib/ClassPathMonitor.java 2012-05-17
01:12:26 UTC (rev 41103)
@@ -258,9 +258,10 @@
Set<String> result = new HashSet<String>();
String text = ((FileAnyImpl)o).getAsText();
if(text == null || text.length() == 0) return EMPTY_RUNTIMES;
- StringTokenizer st = new StringTokenizer(text, " \r\n\t");
+ StringTokenizer st = new StringTokenizer(text, "\r\n\t"); //$NON-NLS-1$
while(st.hasMoreTokens()) {
String t = st.nextToken().trim();
+ if(t.length() == 0 || t.startsWith("#")) continue;
if(t.length() > 0) result.add(t);
}
return result;