src/hotspot/share/oops/symbol.cpp
changeset 58722 cba8afa5cfed
parent 58015 dd84de796f2c
child 59252 623722a6aeb9
--- a/src/hotspot/share/oops/symbol.cpp	Mon Oct 21 09:26:14 2019 -0700
+++ b/src/hotspot/share/oops/symbol.cpp	Mon Oct 21 13:13:16 2019 -0400
@@ -201,8 +201,8 @@
   int   length = (int)strlen(str);
   // Turn all '/'s into '.'s (also for array klasses)
   for (int index = 0; index < length; index++) {
-    if (str[index] == '/') {
-      str[index] = '.';
+    if (str[index] == JVM_SIGNATURE_SLASH) {
+      str[index] = JVM_SIGNATURE_DOT;
     }
   }
   return str;
@@ -210,8 +210,8 @@
 
 static void print_class(outputStream *os, char *class_str, int len) {
   for (int i = 0; i < len; ++i) {
-    if (class_str[i] == '/') {
-      os->put('.');
+    if (class_str[i] == JVM_SIGNATURE_SLASH) {
+      os->put(JVM_SIGNATURE_DOT);
     } else {
       os->put(class_str[i]);
     }
@@ -221,9 +221,9 @@
 static void print_array(outputStream *os, char *array_str, int len) {
   int dimensions = 0;
   for (int i = 0; i < len; ++i) {
-    if (array_str[i] == '[') {
+    if (array_str[i] == JVM_SIGNATURE_ARRAY) {
       dimensions++;
-    } else if (array_str[i] == 'L') {
+    } else if (array_str[i] == JVM_SIGNATURE_CLASS) {
       // Expected format: L<type name>;. Skip 'L' and ';' delimiting the type name.
       print_class(os, array_str+i+1, len-i-2);
       break;