Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D8A45DF49 for ; Wed, 28 Nov 2012 20:35:39 +0000 (UTC) Received: (qmail 95576 invoked by uid 500); 28 Nov 2012 20:35:39 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 95519 invoked by uid 500); 28 Nov 2012 20:35:39 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 95511 invoked by uid 99); 28 Nov 2012 20:35:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2012 20:35:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Nov 2012 20:35:38 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id B5CAF2388A64; Wed, 28 Nov 2012 20:35:18 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1414905 - /cxf/branches/2.6.x-fixes/tools/wadlto/jaxrs/src/main/java/org/apache/cxf/tools/wadlto/jaxrs/SourceGenerator.java Date: Wed, 28 Nov 2012 20:35:18 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121128203518.B5CAF2388A64@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 schemaElements, Set 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);