< prev index next >

src/java.base/share/classes/java/lang/invoke/MethodType.java

Print this page
*** 40,10 ***
--- 40,11 ---
  import java.util.StringJoiner;
  import java.util.concurrent.ConcurrentHashMap;
  import java.util.concurrent.ConcurrentMap;
  import java.util.stream.Stream;
  
+ import jdk.internal.access.SharedSecrets;
  import jdk.internal.vm.annotation.Stable;
  import sun.invoke.util.BytecodeDescriptor;
  import sun.invoke.util.VerifyType;
  import sun.invoke.util.Wrapper;
  import sun.security.util.SecurityConstants;

*** 1349,11 ***
          private final ConcurrentMap<WeakEntry<T>, WeakEntry<T>> map;
          private final ReferenceQueue<T> stale;
  
          public ConcurrentWeakInternSet() {
              this.map = new ConcurrentHashMap<>(512);
!             this.stale = new ReferenceQueue<>();
          }
  
          /**
           * Get the existing interned element.
           * This method returns null if no element is interned.
--- 1350,11 ---
          private final ConcurrentMap<WeakEntry<T>, WeakEntry<T>> map;
          private final ReferenceQueue<T> stale;
  
          public ConcurrentWeakInternSet() {
              this.map = new ConcurrentHashMap<>(512);
!             this.stale = SharedSecrets.getJavaLangRefAccess().newNativeReferenceQueue();
          }
  
          /**
           * Get the existing interned element.
           * This method returns null if no element is interned.
< prev index next >