Author: dkulp
Date: Wed Nov 28 20:35:17 2012
New Revision: 1414905
URL: http://svn.apache.org/viewvc?rev=1414905&view=rev
Log:
Merged revisions 1414899 via git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1414899 | dkulp | 2012-11-28 15:29:38 -0500 (Wed, 28 Nov 2012) | 2 lines
Register the error listener sooner to catch parse errors
........
Modified:
cxf/branches/2.6.x-fixes/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
Modified:
cxf/branches/2.6.x-fixes/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java?rev=1414905&r1=1414904&r2=1414905&view=diff
==============================================================================
---
cxf/branches/2.6.x-fixes/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
(original)
+++
cxf/branches/2.6.x-fixes/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java
Wed Nov 28 20:35:17 2012
@@ -1374,6 +1374,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) {
@@ -1385,11 +1389,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);