comparison jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotVMConfigAccess.java @ 23700:9e1235406b59

[Findbugs] various warnings reported for JVMCI sources (JDK-8159613)
author Doug Simon <doug.simon@oracle.com>
date Sat, 18 Jun 2016 13:19:01 +0200
parents 50465926fbeb
children 724fbad94ee3
comparison
equal deleted inserted replaced
23699:8f9709f61cd4 23700:9e1235406b59
124 return notPresent; 124 return notPresent;
125 } 125 }
126 if (entry.address != 0) { 126 if (entry.address != 0) {
127 throw new JVMCIError("cannot get offset of static field " + name); 127 throw new JVMCIError("cannot get offset of static field " + name);
128 } 128 }
129 return entry == null ? notPresent : type.cast(convertValue(name, type, entry.offset, cppType)); 129 return type.cast(convertValue(name, type, entry.offset, cppType));
130 } 130 }
131 131
132 /** 132 /**
133 * Gets the offset of a non-static C++ field. 133 * Gets the offset of a non-static C++ field.
134 * 134 *
171 return notPresent; 171 return notPresent;
172 } 172 }
173 if (entry.address == 0) { 173 if (entry.address == 0) {
174 throw new JVMCIError(name + " is not a static field"); 174 throw new JVMCIError(name + " is not a static field");
175 } 175 }
176 return entry == null ? notPresent : entry.address; 176 return entry.address;
177 } 177 }
178 178
179 /** 179 /**
180 * Gets the address of a static C++ field. 180 * Gets the address of a static C++ field.
181 * 181 *
311 return value; 311 return value;
312 } else if (value instanceof Long) { 312 } else if (value instanceof Long) {
313 return (int) (long) value; 313 return (int) (long) value;
314 } 314 }
315 } else if (toType == Long.class) { 315 } else if (toType == Long.class) {
316 return (long) value; 316 return value;
317 } 317 }
318 318
319 throw new JVMCIError("cannot convert " + name + " of type " + value.getClass().getSimpleName() + (cppType == null ? "" : " [" + cppType + "]") + " to " + toType.getSimpleName()); 319 throw new JVMCIError("cannot convert " + name + " of type " + value.getClass().getSimpleName() + (cppType == null ? "" : " [" + cppType + "]") + " to " + toType.getSimpleName());
320 } 320 }
321 321