cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1414899 - /cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
Date Wed, 28 Nov 2012 20:29:39 GMT
Author: dkulp
Date: Wed Nov 28 20:29:38 2012
New Revision: 1414899

URL: http://svn.apache.org/viewvc?rev=1414899&view=rev
Log:
Register the error listener sooner to catch parse errors

Modified:
    cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java

Modified: cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java?rev=1414899&r1=1414898&r2=1414899&view=diff
==============================================================================
--- cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
(original)
+++ cxf/trunk/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
Wed Nov 28 20:29:38 2012
@@ -1402,6 +1402,10 @@ public class SourceGenerator {
     private JCodeModel createCodeModel(List<SchemaInfo> schemaElements, Set<String>
type) {
         
         SchemaCompiler compiler = createCompiler(type);
+        Object elForRun = ReflectionInvokationHandler
+            .createProxyWrapper(new InnerErrorListener(),
+                            JAXBUtils.getParamClass(compiler, "setErrorListener"));
+        compiler.setErrorListener(elForRun);
         compiler.setEntityResolver(OASISCatalogManager.getCatalogManager(bus)
                                        .getEntityResolver());
         if (compilerArgs.size() > 0) {
@@ -1413,11 +1417,6 @@ public class SourceGenerator {
             compiler.getOptions().addBindFile(is);
         }
         
-        Object elForRun = ReflectionInvokationHandler
-            .createProxyWrapper(new InnerErrorListener(),
-                            JAXBUtils.getParamClass(compiler, "setErrorListener"));
-        
-        compiler.setErrorListener(elForRun);
         S2JJAXBModel intermediateModel = compiler.bind();
         JCodeModel codeModel = intermediateModel.generateCode(null, elForRun);
         JAXBUtils.logGeneratedClassNames(LOG, codeModel);



Mime
View raw message