[jboss-cvs] JBossAS SVN: r105417 - projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon May 31 11:42:49 EDT 2010
Author: alesj
Date: 2010-05-31 11:42:48 -0400 (Mon, 31 May 2010)
New Revision: 105417
Modified:
projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate/ScannerImpl.java
projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate/SingleAnnotationVisitor.java
Log:
Add error handler.
Modified: projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate/ScannerImpl.java
===================================================================
--- projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate/ScannerImpl.java 2010-05-31 15:22:13 UTC (rev 105416)
+++ projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate/ScannerImpl.java 2010-05-31 15:42:48 UTC (rev 105417)
@@ -39,6 +39,7 @@
import org.jboss.scanning.plugins.helpers.MergeUtils;
import org.jboss.scanning.plugins.helpers.ResourceOwnerFinder;
import org.jboss.scanning.plugins.helpers.WeakClassLoaderHolder;
+import org.jboss.scanning.plugins.visitor.ErrorHandler;
import org.jboss.scanning.spi.ScanningHandle;
import org.jboss.vfs.VFS;
import org.jboss.vfs.VirtualFile;
@@ -69,6 +70,8 @@
private DeploymentUnit unit;
/** The resource finder */
private ResourceOwnerFinder finder;
+ /** The error handler */
+ private ErrorHandler handler;
/** Do we allow query invocation search */
private boolean allowQueryInvocationSearch; // by default false, as we expect things to be pre-indexed
/** Do we cache new results */
@@ -86,6 +89,7 @@
super(check(unit).getClassLoader());
this.unit = unit;
this.finder = DeploymentUtilsFactory.getFinder(unit);
+ this.handler = DeploymentUtilsFactory.getHandler(unit);
}
/**
@@ -110,6 +114,11 @@
return finder.findOwnerURL(resource);
}
+ ErrorHandler getErrorHandler()
+ {
+ return handler;
+ }
+
Package loadPackage(String pckg)
{
return loadClass(pckg + ".package-info").getPackage();
@@ -282,7 +291,9 @@
{
Set<String> tmpStrings = new HashSet<String>();
temp.put(annotation, tmpStrings);
- visitors[i++] = new TempAnnotationVisitor(null, annotation, strings);
+ TempAnnotationVisitor tav = new TempAnnotationVisitor(null, annotation, strings);
+ tav.setErrorHandler(getErrorHandler());
+ visitors[i++] = tav;
}
ResourceVisitor visitor = new FederatedResourceVisitor(visitors, null, null);
module.visit(visitor, visitor.getFilter(), null, jartoScan);
Modified: projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate/SingleAnnotationVisitor.java
===================================================================
--- projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate/SingleAnnotationVisitor.java 2010-05-31 15:22:13 UTC (rev 105416)
+++ projects/scanning/trunk/plugins/src/main/java/org/jboss/scanning/hibernate/SingleAnnotationVisitor.java 2010-05-31 15:42:48 UTC (rev 105417)
@@ -53,6 +53,7 @@
this.annotation = annotation;
this.scanner = scanner;
+ setErrorHandler(scanner.getErrorHandler());
}
public ResourceFilter getFilter()
More information about the jboss-cvs-commits
mailing list