diff src/share/vm/jvmci/jvmciRuntime.cpp @ 22530:cbab86a6c7f6

make processing of <jre>/lib/jvmci/*.properties file like other Java *.properties files in that the last definition of any propery "wins"
author Doug Simon <doug.simon@oracle.com>
date Mon, 07 Sep 2015 22:23:35 +0200
parents 23db6926b163
children ea6d1727fdc6
line wrap: on
line diff
--- a/src/share/vm/jvmci/jvmciRuntime.cpp	Mon Sep 07 18:08:46 2015 +0200
+++ b/src/share/vm/jvmci/jvmciRuntime.cpp	Mon Sep 07 22:23:35 2015 +0200
@@ -841,7 +841,8 @@
  * Everything before the '=' is the property name and everything after '=' is the value.
  * Lines that start with '#' are treated as comments and ignored.
  * No special processing of whitespace or any escape characters is performed.
- * Also, no check is made whether an existing property is overridden.
+ * The last definition of a property "wins" (i.e., it overrides all earlier
+ * definitions of the property).
  */
 class JVMCIPropertiesFileClosure : public ParseClosure {
   SystemProperty** _plist;
@@ -865,7 +866,7 @@
     *sep = '\0';
     const char* name = line;
     char* value = sep + 1;
-    Arguments::PropertyList_add(_plist, name, value);
+    Arguments::PropertyList_unique_add(_plist, name, value);
   }
 };