maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bri...@apache.org
Subject svn commit: r591938 - /maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/ProjectBuildingException.java
Date Mon, 05 Nov 2007 09:49:13 GMT
Author: brianf
Date: Mon Nov  5 01:49:13 2007
New Revision: 591938

URL: http://svn.apache.org/viewvc?rev=591938&view=rev
Log:
fixed NPE in exception msg

Modified:
    maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/ProjectBuildingException.java

Modified: maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/ProjectBuildingException.java
URL: http://svn.apache.org/viewvc/maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/ProjectBuildingException.java?rev=591938&r1=591937&r2=591938&view=diff
==============================================================================
--- maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/ProjectBuildingException.java
(original)
+++ maven/components/trunk/maven-project/src/main/java/org/apache/maven/project/ProjectBuildingException.java
Mon Nov  5 01:49:13 2007
@@ -276,13 +276,20 @@
     /**
      * @deprecated use {@link #getPomUri()}
      */
-    public String getPomLocation()
+    public String getPomLocation ()
     {
-        if ( "file".equals( getPomUri().getScheme() ) )
+        if ( getPomUri() != null )
         {
-            return new File( getPomUri() ).getAbsolutePath();
+            if ( "file".equals( getPomUri().getScheme() ) )
+            {
+                return new File( getPomUri() ).getAbsolutePath();
+            }
+            return getPomUri().toString();
+        }
+        else
+        {
+            return "null";
         }
-        return getPomUri().toString();
     }
 
     public String getProjectId()



Mime
View raw message