< prev index next >
src/java.base/share/classes/java/lang/invoke/BoundMethodHandle.java
Print this page
rev 12962 : 8136967: revert all changes applied to obtain information about 8131129
*** 402,419 ****
}
// Reacquire cache lock.
d = lookupCache(types);
// Class loading must have upgraded the cache.
assert(d != null && !d.isPlaceholder());
- if (OBSERVE_BMH_SPECIES_CREATION) {
- if (d == null) {
- throw new IllegalStateException("d == null");
- }
- if (d.isPlaceholder()) {
- throw new IllegalStateException("d is place holder");
- }
- }
return d;
}
static SpeciesData getForClass(String types, Class<? extends BoundMethodHandle> clazz) {
// clazz is a new class which is initializing its SPECIES_DATA field
return updateCache(types, new SpeciesData(types, clazz));
--- 402,411 ----
*** 421,449 ****
private static synchronized SpeciesData lookupCache(String types) {
SpeciesData d = CACHE.get(types);
if (d != null) return d;
d = new SpeciesData(types);
assert(d.isPlaceholder());
- if (OBSERVE_BMH_SPECIES_CREATION && !d.isPlaceholder()) {
- throw new IllegalStateException("d is not place holder");
- }
CACHE.put(types, d);
return d;
}
private static synchronized SpeciesData updateCache(String types, SpeciesData d) {
SpeciesData d2;
assert((d2 = CACHE.get(types)) == null || d2.isPlaceholder());
assert(!d.isPlaceholder());
- if (OBSERVE_BMH_SPECIES_CREATION) {
- d2 = CACHE.get(types);
- if (d2 != null && !d2.isPlaceholder()) {
- throw new IllegalStateException("non-null d2 is not place holder");
- }
- if (d.isPlaceholder()) {
- throw new IllegalStateException("d is place holder");
- }
- }
CACHE.put(types, d);
return d;
}
static {
--- 413,429 ----
< prev index next >