<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Thanks for the report. This is known as <a href="https://bugs.openjdk.org/browse/JDK-8364095">
https://bugs.openjdk.org/browse/JDK-8364095</a>, and the proper modeling of preview features is pending on
<a href="https://github.com/openjdk/jdk/pull/25017">https://github.com/openjdk/jdk/pull/25017</a>.</div>
<div style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div style="font-family: "Calibri Light", "Helvetica Light", sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
Chen</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> valhalla-dev <valhalla-dev-retn@openjdk.org> on behalf of Remi Forax <forax@univ-mlv.fr><br>
<b>Sent:</b> Friday, August 8, 2025 5:53 PM<br>
<b>To:</b> valhalla-dev <valhalla-dev@openjdk.org><br>
<b>Subject:</b> NPE in javap</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">This class throw an NPE in javap:<br>
<br>
public value class RangeValue {<br>
  private int min;<br>
  private int max;<br>
<br>
  public RangeValue(int a, int b) {<br>
    if (a > b) {<br>
      this.min = b;<br>
      this.max = a;<br>
    } else {<br>
      this.min = a;<br>
      this.max = b;<br>
    }<br>
    super();<br>
  }<br>
<br>
  public int min() {<br>
    return min;<br>
  }<br>
<br>
  public int max() {<br>
    return max;<br>
  }<br>
}<br>
<br>
<br>
The stacktrace seems to say that ACC_STRICT (on fields) is not supported.<br>
<br>
Rémi<br>
<br>
---<br>
<br>
bash-3.2$ $JAVA_HOME/bin/javap -c -verbose -private target/classes/RangeValue.class<br>
Classfile /Users/forax/git/weather-alert/target/classes/RangeValue.class<br>
  Last modified 9 Aug 2025; size 549 bytes<br>
  SHA-256 checksum 10fcbe0722123c3576c1c9a4814180d3a436510b09c8308083b47b7bfe23d1bd<br>
  Compiled from "RangeValue.java"<br>
public final value class RangeValue<br>
  minor version: 65535<br>
  major version: 69<br>
  flags: (0x0011) ACC_PUBLIC, ACC_FINAL<br>
  this_class: #2                          // RangeValue<br>
  super_class: #11                        // java/lang/Object<br>
  interfaces: 0, fields: 2, methods: 3, attributes: 1<br>
Constant pool:<br>
   #1 = Fieldref           #2.#3          // RangeValue.min:I<br>
   #2 = Class              #4             // RangeValue<br>
   #3 = NameAndType        #5:#6          // min:I<br>
   #4 = Utf8               RangeValue<br>
   #5 = Utf8               min<br>
   #6 = Utf8               I<br>
   #7 = Fieldref           #2.#8          // RangeValue.max:I<br>
   #8 = NameAndType        #9:#6          // max:I<br>
   #9 = Utf8               max<br>
  #10 = Methodref          #11.#12        // java/lang/Object."<init>":()V<br>
  #11 = Class              #13            // java/lang/Object<br>
  #12 = NameAndType        #14:#15        // "<init>":()V<br>
  #13 = Utf8               java/lang/Object<br>
  #14 = Utf8               <init><br>
  #15 = Utf8               ()V<br>
  #16 = Utf8               (II)V<br>
  #17 = Utf8               Code<br>
  #18 = Utf8               LineNumberTable<br>
  #19 = Utf8               LocalVariableTable<br>
  #20 = Utf8               this<br>
  #21 = Utf8               LRangeValue;<br>
  #22 = Utf8               a<br>
  #23 = Utf8               b<br>
  #24 = Utf8               StackMapTable<br>
  #25 = Utf8               ()I<br>
  #26 = Utf8               SourceFile<br>
  #27 = Utf8               RangeValue.java<br>
{<br>
Error: A serious internal error has occurred: java.lang.NullPointerException<br>
Please file a bug report, and include the following information:<br>
java.lang.NullPointerException<br>
        at java.base/java.util.Objects.requireNonNull(Objects.java:318)<br>
        at java.base/java.lang.reflect.AccessFlag$Location.findInHistory(AccessFlag.java:671)<br>
        at java.base/java.lang.reflect.AccessFlag$Location.flagsMask(AccessFlag.java:707)<br>
        at jdk.jdeps/com.sun.tools.javap.BasicWriter.maskToAccessFlagsReportUnknown(BasicWriter.java:66)<br>
        at jdk.jdeps/com.sun.tools.javap.BasicWriter.flagsReportUnknown(BasicWriter.java:58)<br>
        at jdk.jdeps/com.sun.tools.javap.ClassWriter.writeField(ClassWriter.java:437)<br>
        at jdk.jdeps/com.sun.tools.javap.ClassWriter.writeFields(ClassWriter.java:428)<br>
        at jdk.jdeps/com.sun.tools.javap.ClassWriter.write(ClassWriter.java:261)<br>
        at jdk.jdeps/com.sun.tools.javap.JavapTask.write(JavapTask.java:859)<br>
        at jdk.jdeps/com.sun.tools.javap.JavapTask.writeClass(JavapTask.java:684)<br>
        at jdk.jdeps/com.sun.tools.javap.JavapTask.run(JavapTask.java:628)<br>
        at jdk.jdeps/com.sun.tools.javap.JavapTask.run(JavapTask.java:474)<br>
        at jdk.jdeps/com.sun.tools.javap.Main.main(Main.java:48)<br>
</div>
</span></font></div>
</body>
</html>