< prev index next >
test/jdk/valhalla/valuetypes/NonFlattenValue.java
Print this page
rev 55127 : 8223351: [lworld] Primary mirror and nullable mirror for inline type
Reviewed-by: tbd
@@ -23,12 +23,11 @@
public inline class NonFlattenValue {
Point? nfp;
NonFlattenValue() {
- Point p = Point.makePoint(0,0);
- this.nfp = p;
+ this.nfp = Point.makePoint(0,0);
}
public Point? point() {
return nfp;
}
public Point pointValue() {
@@ -45,8 +44,9 @@
return v;
}
@Override
public String toString() {
- return nfp.toString();
+ // nfp may be null when NonFlattenValue[] is created and filled with default value
+ return nfp != null ? nfp.toString() : "default NonFlattenValue";
}
}
< prev index next >