< prev index next >

src/jdk.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java

Print this page

        

@@ -124,11 +124,11 @@
             return notPresent;
         }
         if (entry.address != 0) {
             throw new JVMCIError("cannot get offset of static field " + name);
         }
-        return entry == null ? notPresent : type.cast(convertValue(name, type, entry.offset, cppType));
+        return type.cast(convertValue(name, type, entry.offset, cppType));
     }
 
     /**
      * Gets the offset of a non-static C++ field.
      *

@@ -171,11 +171,11 @@
             return notPresent;
         }
         if (entry.address == 0) {
             throw new JVMCIError(name + " is not a static field");
         }
-        return entry == null ? notPresent : entry.address;
+        return entry.address;
     }
 
     /**
      * Gets the address of a static C++ field.
      *

@@ -311,11 +311,11 @@
                 return value;
             } else if (value instanceof Long) {
                 return (int) (long) value;
             }
         } else if (toType == Long.class) {
-            return (long) value;
+            return value;
         }
 
         throw new JVMCIError("cannot convert " + name + " of type " + value.getClass().getSimpleName() + (cppType == null ? "" : " [" + cppType + "]") + " to " + toType.getSimpleName());
     }
 
< prev index next >