changeset 31:5d0dc302199d 7.0-b06

CODETOOLS-7902323 jdis writes a minor_version item that has all 16 bits set as -1
author lkuskov
date Mon, 24 Sep 2018 13:14:00 -0700
parents 9092900a27ad
children ace7df328bb1
files src/org/openjdk/asmtools/jdis/ClassData.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/org/openjdk/asmtools/jdis/ClassData.java	Mon Sep 24 13:04:04 2018 -0700
+++ b/src/org/openjdk/asmtools/jdis/ClassData.java	Mon Sep 24 13:14:00 2018 -0700
@@ -270,8 +270,8 @@
         if (magic != JAVA_MAGIC) {
             throw new ClassFormatError("wrong magic: " + HexUtils.toHex(magic) + ", expected " + HexUtils.toHex(JAVA_MAGIC));
         }
-        minor_version = in.readShort();
-        major_version = in.readShort();
+        minor_version = in.readUnsignedShort();
+        major_version = in.readUnsignedShort();
 
         // Read the constant pool
         // -----------------------------------------------