maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject [2/2] git commit: [SUREFIRE-951] Added warning about trying to set file.encoding via systemproperty
Date Fri, 03 May 2013 19:54:26 GMT
[SUREFIRE-951] Added warning about trying to set file.encoding via systemproperty


Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo
Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/72893fed
Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/72893fed
Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/72893fed

Branch: refs/heads/master
Commit: 72893fed610a08d06ccb36229e85f6e31a756871
Parents: 268f3be
Author: Kristian Rosenvold <krosenvold@apache.org>
Authored: Fri May 3 21:27:44 2013 +0200
Committer: Kristian Rosenvold <krosenvold@apache.org>
Committed: Fri May 3 21:41:49 2013 +0200

----------------------------------------------------------------------
 .../maven/plugin/surefire/SurefireProperties.java  |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/72893fed/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java
----------------------------------------------------------------------
diff --git a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java
b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java
index 93e44a7..ff5cd69 100644
--- a/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java
+++ b/maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireProperties.java
@@ -24,10 +24,13 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.util.Collections;
 import java.util.Enumeration;
+import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedHashSet;
 import java.util.Map;
 import java.util.Properties;
+import java.util.Set;
+
 import org.apache.maven.plugin.logging.Log;
 import org.apache.maven.surefire.booter.KeyValueSource;
 
@@ -107,14 +110,18 @@ public class SurefireProperties
         }
     }
 
+    private static final Set<String> keysThatCannotBeUsedAsSystemProperties = new HashSet<String>(
 ){{
+        add( "java.library.path" );
+        add( "file.encoding");
+        add( "jdk.map.althashing.threshold" );
+    }};
+
     public void verifyLegalSystemProperties( org.apache.maven.plugin.logging.Log log )
     {
         for ( Object key : getStringKeySet() )
         {
-            if ( "java.library.path".equals( key ) )
-            {
-                log.warn(
-                    "java.library.path cannot be set as system property, use <argLine>-Djava.library.path=...<argLine>
instead" );
+            if (keysThatCannotBeUsedAsSystemProperties.contains( key )) {
+                log.warn( key + " cannot be set as system property, use <argLine>-D"
+ key + "=...<argLine> instead" );
             }
         }
     }


Mime
View raw message