changeset 7709:b8252dc6d694

AddModuleExports and AddModuleRequires are ccstr arguments rather than ccstrlist Drop confusing comma in IllegalAccessError messages
author alanb
date Sat, 24 Jan 2015 09:05:01 +0000
parents 8b04c6444f29
children 88ffaead0056
files src/share/vm/prims/jvm.cpp src/share/vm/runtime/globals.hpp src/share/vm/runtime/reflection.cpp
diffstat 3 files changed, 10 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/prims/jvm.cpp	Wed Jan 21 10:43:30 2015 +0100
+++ b/src/share/vm/prims/jvm.cpp	Sat Jan 24 09:05:01 2015 +0000
@@ -401,10 +401,10 @@
   }
 
   // Additional module dependences and exports
-  if (strlen(AddModuleRequires) > 0) {
+  if (AddModuleRequires != NULL) {
     PUTPROP(props, "jdk.runtime.addModuleRequires", AddModuleRequires);
   }
-  if (strlen(AddModuleExports) > 0) {
+  if (AddModuleExports != NULL) {
     PUTPROP(props, "jdk.runtime.addModuleExports", AddModuleExports);
   }
 
--- a/src/share/vm/runtime/globals.hpp	Wed Jan 21 10:43:30 2015 +0100
+++ b/src/share/vm/runtime/globals.hpp	Sat Jan 24 09:05:01 2015 +0000
@@ -1302,10 +1302,10 @@
   product(bool, UseModules, true,                                           \
           "Use access control to enforce module boundaries")                \
                                                                             \
-  product(ccstrlist, AddModuleRequires, "",                                 \
+  product(ccstr, AddModuleRequires, NULL,                                   \
           "Additional module dependences, for example jtreg=java.xml")      \
                                                                             \
-  product(ccstrlist, AddModuleExports, "",                                  \
+  product(ccstr, AddModuleExports, NULL,                                    \
           "Additional module exports, for example java.base/sun.misc")      \
                                                                             \
   /* tracing */                                                             \
--- a/src/share/vm/runtime/reflection.cpp	Wed Jan 21 10:43:30 2015 +0100
+++ b/src/share/vm/runtime/reflection.cpp	Sat Jan 24 09:05:01 2015 +0000
@@ -460,7 +460,7 @@
     if (module_from != NULL && !module_from->can_read(module_to)) {
       if (TraceAccessControlErrors) {
         ResourceMark rm;
-        tty->print_cr("Type in module %s (%s) can not access type in module %s (%s), not readable",
+        tty->print_cr("Type in module %s (%s) cannot access type in module %s (%s), not readable",
           module_from->name()->as_C_string(), current_class->external_name(),
           module_to->name()->as_C_string(), new_class->external_name());
       }
@@ -488,7 +488,7 @@
       if (!okay) {
         if (TraceAccessControlErrors) {
           ResourceMark rm;
-          tty->print_cr("Type in module %s (%s) can not access type in module %s (%s), not exported",
+          tty->print_cr("Type in module %s (%s) cannot access type in module %s (%s), not exported",
             module_from->name()->as_C_string(), current_class->external_name(),
             module_to->name()->as_C_string(), new_class->external_name());
         }
@@ -502,7 +502,7 @@
       //   2. module_to exports T unqualifiedly to all modules (checked above).
       if (TraceAccessControlErrors) {
         ResourceMark rm;
-        tty->print_cr("Type in the unnamed module (%s) can not access type in module %s (%s), not unqualifiedly exported",
+        tty->print_cr("Type in the unnamed module (%s) cannot access type in module %s (%s), not unqualifiedly exported",
           current_class->external_name(), module_to->name()->as_C_string(), new_class->external_name());
       }
       return TYPE_NOT_UNQ_EXPORTED;
@@ -538,7 +538,7 @@
           len = len + strlen(package_name);
           msg = NEW_RESOURCE_ARRAY(char, len);
           jio_snprintf(msg, len - 1,
-            "class %s (in module: unnamed), can not access class %s (in module: %s), %s is not exported to the unnamed module",
+            "class %s (in module: unnamed) cannot access class %s (in module: %s), %s is not exported to the unnamed module",
             current_class_name, new_class_name, module_to_name, package_name);
         }
 
@@ -552,7 +552,7 @@
             len = len + strlen(module_to_name);
             msg = NEW_RESOURCE_ARRAY(char, len);
             jio_snprintf(msg, len - 1,
-              "class %s in module %s can not access class %s in module %s, %s can not read %s",
+              "class %s in module %s cannot access class %s in module %s, %s can not read %s",
               current_class_name, module_from_name, new_class_name,
               module_to_name, module_from_name, module_to_name);
 
@@ -563,7 +563,7 @@
               len = len + strlen(package_name);
               msg = NEW_RESOURCE_ARRAY(char, len);
               jio_snprintf(msg, len - 1,
-                "class %s (in module: %s), can not access class %s (in module: %s), %s is not exported to %s",
+                "class %s (in module: %s) cannot access class %s (in module: %s), %s is not exported to %s",
                 current_class_name, module_from_name, new_class_name,
                 module_to_name, package_name, module_from_name);
             }