src/share/classes/sun/reflect/generics/scope/AbstractScope.java
Print this page
rev 7735 : 8064846: Lazy-init thread safety problems in core reflection
*** 40,50 ****
*/
public abstract class AbstractScope<D extends GenericDeclaration>
implements Scope {
private final D recvr; // the declaration whose scope this instance represents
! private volatile Scope enclosingScope; // the enclosing scope of this scope
/**
* Constructor. Takes a reflective object whose scope the newly
* constructed instance will represent.
* @param D - A generic declaration whose scope the newly
--- 40,52 ----
*/
public abstract class AbstractScope<D extends GenericDeclaration>
implements Scope {
private final D recvr; // the declaration whose scope this instance represents
!
! /** The enclosing scope of this scope. Lazily initialized. */
! private volatile Scope enclosingScope;
/**
* Constructor. Takes a reflective object whose scope the newly
* constructed instance will represent.
* @param D - A generic declaration whose scope the newly