- 
    Bug 
- 
    Resolution: Fixed
- 
     P3 P3
- 
    repo-valhalla
- 
    None
                    1. Compile the sample test.
2. Start jdb:
$ jdb -classpath . -XX:+EnableValhalla Test
3. Set breakpoint on the line with System.out.println()
> stop at Test:8
4. Run to breakpoint
> run
5. Create a new value type instance
> eval new Test$MyValue(7,'f')
Expected result:
The output should be
new Test$MyValue(7,'f') = "[value class Test$MyValue, 7, f]"
Actual result:
The printed output is
new Test$MyValue(7,'f') = "[value class Test$MyValue, 0, ]"
=============================================
public class Test {
public static void main(String[] args){
MyValue v = new MyValue(12,'c');
System.out.println("v == v " + (v == v));
}
public final __ByValue static class MyValue {
int a;
char b;
public MyValue(int a, char b){
this.a = a;
this.b = b;
}
}
}
            
2. Start jdb:
$ jdb -classpath . -XX:+EnableValhalla Test
3. Set breakpoint on the line with System.out.println()
> stop at Test:8
4. Run to breakpoint
> run
5. Create a new value type instance
> eval new Test$MyValue(7,'f')
Expected result:
The output should be
new Test$MyValue(7,'f') = "[value class Test$MyValue, 7, f]"
Actual result:
The printed output is
new Test$MyValue(7,'f') = "[value class Test$MyValue, 0, ]"
=============================================
public class Test {
public static void main(String[] args){
MyValue v = new MyValue(12,'c');
System.out.println("v == v " + (v == v));
}
public final __ByValue static class MyValue {
int a;
char b;
public MyValue(int a, char b){
this.a = a;
this.b = b;
}
}
}
- clones
- 
                    JDK-8211026 jdb should not allow to assign null to value type -           
- Resolved
 
-         
- is cloned by
- 
                    JDK-8211030 jdb crashes in jni_IsInstanceOf when setting value type field to itself -           
- Closed
 
-