Blame SOURCES/0001-Copy-input-map-in-setCustomCompilerArguments-AsMap.patch

1d9c18
From 3a9c9a0bea7794c04ddbb8ac0520839c0f3d1cd0 Mon Sep 17 00:00:00 2001
1d9c18
From: Michael Simacek <msimacek@redhat.com>
1d9c18
Date: Tue, 1 Nov 2016 11:17:02 +0100
1d9c18
Subject: [PATCH] Copy input map in setCustomCompilerArguments[AsMap]
1d9c18
1d9c18
---
1d9c18
 .../plexus/compiler/CompilerConfiguration.java         | 18 ++++--------------
1d9c18
 1 file changed, 4 insertions(+), 14 deletions(-)
1d9c18
1d9c18
diff --git a/plexus-compiler-api/src/main/java/org/codehaus/plexus/compiler/CompilerConfiguration.java b/plexus-compiler-api/src/main/java/org/codehaus/plexus/compiler/CompilerConfiguration.java
1d9c18
index 69fc810..d4c4c03 100644
1d9c18
--- a/plexus-compiler-api/src/main/java/org/codehaus/plexus/compiler/CompilerConfiguration.java
1d9c18
+++ b/plexus-compiler-api/src/main/java/org/codehaus/plexus/compiler/CompilerConfiguration.java
1d9c18
@@ -426,14 +426,7 @@ public class CompilerConfiguration
1d9c18
     @Deprecated
1d9c18
     public void setCustomCompilerArguments( LinkedHashMap<String, String> customCompilerArguments )
1d9c18
     {
1d9c18
-        if ( customCompilerArguments == null )
1d9c18
-        {
1d9c18
-            this.customCompilerArguments = new ArrayList<Map.Entry<String,String>>();
1d9c18
-        }
1d9c18
-        else
1d9c18
-        {
1d9c18
-            this.customCompilerArguments = customCompilerArguments.entrySet();
1d9c18
-        }
1d9c18
+        setCustomCompilerArgumentsAsMap( customCompilerArguments );
1d9c18
     }
1d9c18
 
1d9c18
     /**
1d9c18
@@ -454,13 +447,10 @@ public class CompilerConfiguration
1d9c18
 
1d9c18
     public void setCustomCompilerArgumentsAsMap( Map<String, String> customCompilerArguments )
1d9c18
     {
1d9c18
-        if ( customCompilerArguments == null )
1d9c18
-        {
1d9c18
-            this.customCompilerArguments = new ArrayList<Map.Entry<String,String>>();
1d9c18
-        }
1d9c18
-        else
1d9c18
+        this.customCompilerArguments = new ArrayList<Map.Entry<String,String>>();
1d9c18
+        if ( customCompilerArguments != null )
1d9c18
         {
1d9c18
-            this.customCompilerArguments = customCompilerArguments.entrySet();
1d9c18
+            this.customCompilerArguments.addAll( customCompilerArguments.entrySet() );
1d9c18
         }
1d9c18
     }
1d9c18
     
1d9c18
-- 
1d9c18
2.7.4
1d9c18