< prev index next >

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

Print this page

        

@@ -43,10 +43,11 @@
 import jdk.internal.util.Preconditions;
 import jdk.internal.vm.annotation.ForceInline;
 import jdk.internal.vm.annotation.Stable;
 
 import static java.lang.invoke.MethodHandleStatics.UNSAFE;
+import static java.lang.invoke.MethodHandleStatics.newInternalError;
 
 /**
  * A VarHandle is a dynamically strongly typed reference to a variable, or to a
  * parametrically-defined family of variables, including static fields,
  * non-static fields, array elements, or components of an off-heap data

@@ -2279,8 +2280,13 @@
                     return String.format("VarHandleDesc[%s[]]", declaringClass.displayName());
                 default:
                     throw new InternalError("Cannot reach here");
             }
         }
+
+        @Override
+        public Optional<? extends ConstantDesc> describeConstable() {
+            return Optional.empty();
+        }
     }
 
 }
< prev index next >