[jboss-cvs] JBossAS SVN: r103909 - projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/weld.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Apr 13 09:33:35 EDT 2010
Author: alesj
Date: 2010-04-13 09:33:35 -0400 (Tue, 13 Apr 2010)
New Revision: 103909
Modified:
projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/weld/WeldScanningPluginFactory.java
Log:
Move env
Modified: projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/weld/WeldScanningPluginFactory.java
===================================================================
--- projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/weld/WeldScanningPluginFactory.java 2010-04-13 13:09:33 UTC (rev 103908)
+++ projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/weld/WeldScanningPluginFactory.java 2010-04-13 13:33:35 UTC (rev 103909)
@@ -50,31 +50,30 @@
Collection<VirtualFile> cpFiles = unit.getAttachment(DeployersUtils.WELD_CLASSPATH, Collection.class);
boolean hasCp = (cpFiles != null && cpFiles.isEmpty() == false);
- WeldDiscoveryEnvironment environment = null;
if (hasWB || hasCp)
{
DeploymentUnit topUnit = unit.getTopLevel();
- environment = topUnit.getAttachment(WeldDiscoveryEnvironment.class);
+ WeldDiscoveryEnvironment environment = topUnit.getAttachment(WeldDiscoveryEnvironment.class);
if (environment == null)
{
environment = new WeldDiscoveryEnvironment();
topUnit.addAttachment(WeldDiscoveryEnvironment.class, environment);
}
- }
- if (hasWB)
- {
- // TODO -- fix this once we have new Weld-int release
- Collection<URL> xmls = environment.getWeldXml();
- try
+ if (hasWB)
{
- for (VirtualFile file : wbFiles)
- xmls.add(file.toURL());
+ // TODO -- fix this once we have new Weld-int release
+ Collection<URL> xmls = environment.getWeldXml();
+ try
+ {
+ for (VirtualFile file : wbFiles)
+ xmls.add(file.toURL());
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
}
- catch (Exception e)
- {
- throw new RuntimeException(e);
- }
}
return hasCp;
More information about the jboss-cvs-commits
mailing list