-
Bug
-
Resolution: Fixed
-
P3
-
repo-valhalla
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:10
4. Run to breakpoint
> run
5. Invoke "eval" command
> eval b == b
6. Continue
> cont
7.Observe that the output printed by System.out.println("v == v " + (b == b)) is " v == v false"
Expected result:
The output on step 5 should be "b == b = false"
Actual result:
The output on step 5 should be "b == b = true"
====================================
public class Test {
public static void main(String[] args){
MyValue v = new MyValue(12,'c');
Object b = new Object();
b = v;
System.out.println("v == v " + (b == b));
}
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:10
4. Run to breakpoint
> run
5. Invoke "eval" command
> eval b == b
6. Continue
> cont
7.Observe that the output printed by System.out.println("v == v " + (b == b)) is " v == v false"
Expected result:
The output on step 5 should be "b == b = false"
Actual result:
The output on step 5 should be "b == b = true"
====================================
public class Test {
public static void main(String[] args){
MyValue v = new MyValue(12,'c');
Object b = new Object();
b = v;
System.out.println("v == v " + (b == b));
}
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
-