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 335BFD87B for ; Tue, 23 Oct 2012 19:51:31 +0000 (UTC) Received: (qmail 69217 invoked by uid 500); 23 Oct 2012 19:51:31 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 69151 invoked by uid 500); 23 Oct 2012 19:51:30 -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 69144 invoked by uid 99); 23 Oct 2012 19:51:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Oct 2012 19:51:30 +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; Tue, 23 Oct 2012 19:51:29 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 8122923888FD; Tue, 23 Oct 2012 19:50:46 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1401418 - /cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java Date: Tue, 23 Oct 2012 19:50:46 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121023195046.8122923888FD@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Tue Oct 23 19:50:46 2012 New Revision: 1401418 URL: http://svn.apache.org/viewvc?rev=1401418&view=rev Log: Avoid a NPE in the mojo to make sure the "real" error surfaces Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java Modified: cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java URL: http://svn.apache.org/viewvc/cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java?rev=1401418&r1=1401417&r2=1401418&view=diff ============================================================================== --- cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java (original) +++ cxf/trunk/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java Tue Oct 23 19:50:46 2012 @@ -71,12 +71,16 @@ public class WSDL2JavaMojo extends Abstr errorfiles.add(f); } if (f == null) { - f = new File(file) { - private static final long serialVersionUID = 1L; - public String getAbsolutePath() { - return file; - } - }; + if (file == null) { + f = new File("null"); + } else { + f = new File(file) { + private static final long serialVersionUID = 1L; + public String getAbsolutePath() { + return file; + } + }; + } } buildContext.addMessage(f, line, column, message, BuildContext.SEVERITY_ERROR, t); }