You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2012/10/23 22:19:21 UTC

svn commit: r1401438 - /cxf/branches/2.6.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java

Author: dkulp
Date: Tue Oct 23 20:19:21 2012
New Revision: 1401438

URL: http://svn.apache.org/viewvc?rev=1401438&view=rev
Log:
Merged revisions 1401418 via  git cherry-pick from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1401418 | dkulp | 2012-10-23 15:50:46 -0400 (Tue, 23 Oct 2012) | 2 lines

  Avoid a NPE in the mojo to make sure the "real" error surfaces

........

Modified:
    cxf/branches/2.6.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java

Modified: cxf/branches/2.6.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java?rev=1401438&r1=1401437&r2=1401438&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java (original)
+++ cxf/branches/2.6.x-fixes/maven-plugins/codegen-plugin/src/main/java/org/apache/cxf/maven_plugin/wsdl2java/WSDL2JavaMojo.java Tue Oct 23 20:19:21 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);
         }