< prev index next >

test/lib/jdk/test/lib/hprof/model/JavaValueArray.java

Print this page
@@ -1,7 +1,7 @@
  /*
-  * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+  * Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.  Oracle designates this

@@ -67,21 +67,21 @@
          }
      }
  
      private static int elementSize(byte type) {
          switch (type) {
-             case T_BYTE:
-             case T_BOOLEAN:
+             case 'B':
+             case 'Z':
                  return 1;
-             case T_CHAR:
-             case T_SHORT:
+             case 'C':
+             case 'S':
                  return 2;
-             case T_INT:
-             case T_FLOAT:
+             case 'I':
+             case 'F':
                  return 4;
-             case T_LONG:
-             case T_DOUBLE:
+             case 'J':
+             case 'D':
                  return 8;
              default:
                  throw new RuntimeException("invalid array element type: " + type);
          }
      }
< prev index next >