mirror of https://github.com/apache/maven.git
Fix NullPointerException if build.properties file doesn't exist in user.home
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@162536 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
02e654b28f
commit
15209dd9f1
|
@ -54,7 +54,7 @@ public class Bootstrapper
|
|||
String basedir = args[0];
|
||||
|
||||
Properties properties = loadProperties( new File( System.getProperty( "user.home" ), "build.properties" ) );
|
||||
|
||||
|
||||
baseUrl = properties.getProperty( "maven.repo.remote" );
|
||||
|
||||
if ( baseUrl == null )
|
||||
|
@ -268,21 +268,19 @@ public class Bootstrapper
|
|||
// ignore
|
||||
}
|
||||
|
||||
return null;
|
||||
return new Properties();
|
||||
}
|
||||
|
||||
private static Properties loadProperties( InputStream is )
|
||||
{
|
||||
Properties properties = new Properties();
|
||||
|
||||
try
|
||||
{
|
||||
Properties properties = new Properties();
|
||||
|
||||
if ( is != null )
|
||||
{
|
||||
properties.load( is );
|
||||
}
|
||||
|
||||
return properties;
|
||||
}
|
||||
catch ( IOException e )
|
||||
{
|
||||
|
@ -303,7 +301,7 @@ public class Bootstrapper
|
|||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
return properties;
|
||||
}
|
||||
|
||||
static class BootstrapPomParser
|
||||
|
|
Loading…
Reference in New Issue