From 885409f5693639c4db74f76cccbf6fed9dd6cd00 Mon Sep 17 00:00:00 2001 From: Jason van Zyl Date: Sat, 2 Jun 2007 16:53:40 +0000 Subject: [PATCH] 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 --- .../DefaultMavenExecutionRequest.java | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java index 9e4c45fd11..295586448b 100644 --- a/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java +++ b/maven-core/src/main/java/org/apache/maven/execution/DefaultMavenExecutionRequest.java @@ -267,7 +267,26 @@ public class DefaultMavenExecutionRequest public MavenExecutionRequest setProperties( Properties properties ) { - this.properties = properties; + if ( this.properties == null ) + { + 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; }