o fix typo causing NPE setting properties

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@543756 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jason van Zyl 2007-06-02 16:53:40 +00:00
parent e8fc77cccd
commit 885409f569
1 changed files with 20 additions and 1 deletions

View File

@ -266,8 +266,27 @@ public class DefaultMavenExecutionRequest
} }
public MavenExecutionRequest setProperties( Properties properties ) public MavenExecutionRequest setProperties( Properties properties )
{
if ( this.properties == null )
{ {
this.properties = properties; this.properties = properties;
}
else
{
this.properties.putAll( properties );
}
return this;
}
public MavenExecutionRequest setProperty( String key, String value )
{
if ( properties == null )
{
properties = new Properties();
}
properties.setProperty( key, value );
return this; return this;
} }