fixed NPE in exception msg

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@591938 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brian E Fox 2007-11-05 09:49:13 +00:00
parent dbd357ffdf
commit 083a7dd4f0
1 changed files with 11 additions and 4 deletions

View File

@ -276,13 +276,20 @@ public class ProjectBuildingException
/**
* @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()