Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8085471 | emb-9 | Jan Lahoda | P3 | Resolved | Fixed | team |
JDK-8086996 | 8u65 | Jan Lahoda | P3 | Resolved | Fixed | b01 |
JDK-8076058 | 8u60 | Jan Lahoda | P3 | Resolved | Fixed | b10 |
JDK-8138422 | emb-8u65 | Unassigned | P3 | Resolved | Fixed | b01 |
JDK-8079045 | emb-8u60 | Jan Lahoda | P3 | Resolved | Fixed | team |
FULL PRODUCT VERSION :
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty
A DESCRIPTION OF THE PROBLEM :
Basically if you're debugging inside a lambda, you can't inspect any variables outside of it. This is happening even if said variables are marked final, and regardless of whether they're being accessed inside the lambda.
The error message is : Cannot find local variable '...' if I try to add such variable to a Watch.
An example:
final int outside = 0;
final Map<Integer, Integer> map = new HashMap<>();
map.put(1, 2);
map.entrySet().stream().forEach(entry -> {
System.out.println(outside); // break here, can't inspect the value of "outside"
return entry.getValue();
}).sum();
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
final int outside = 0;
final Map<Integer, Integer> map = new HashMap<>();
map.put(1, 2);
map.entrySet().stream().forEach(entry -> {
System.out.println(outside); // break here, can't inspect the value of "outside"
return entry.getValue();
}).sum();
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I should see a variable outside in a debugger on a line starting with System.out
ACTUAL -
Variable is not available.
REPRODUCIBILITY :
This bug can be reproduced always.
java version "1.8.0_05"
Java(TM) SE Runtime Environment (build 1.8.0_05-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Distributor ID: Ubuntu
Description: Ubuntu 14.04 LTS
Release: 14.04
Codename: trusty
A DESCRIPTION OF THE PROBLEM :
Basically if you're debugging inside a lambda, you can't inspect any variables outside of it. This is happening even if said variables are marked final, and regardless of whether they're being accessed inside the lambda.
The error message is : Cannot find local variable '...' if I try to add such variable to a Watch.
An example:
final int outside = 0;
final Map<Integer, Integer> map = new HashMap<>();
map.put(1, 2);
map.entrySet().stream().forEach(entry -> {
System.out.println(outside); // break here, can't inspect the value of "outside"
return entry.getValue();
}).sum();
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
final int outside = 0;
final Map<Integer, Integer> map = new HashMap<>();
map.put(1, 2);
map.entrySet().stream().forEach(entry -> {
System.out.println(outside); // break here, can't inspect the value of "outside"
return entry.getValue();
}).sum();
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I should see a variable outside in a debugger on a line starting with System.out
ACTUAL -
Variable is not available.
REPRODUCIBILITY :
This bug can be reproduced always.
- backported by
-
JDK-8076058 Debugger doesn't show variables *outside* lambda
-
- Resolved
-
-
JDK-8079045 Debugger doesn't show variables *outside* lambda
-
- Resolved
-
-
JDK-8085471 Debugger doesn't show variables *outside* lambda
-
- Resolved
-
-
JDK-8086996 Debugger doesn't show variables *outside* lambda
-
- Resolved
-
-
JDK-8138422 Debugger doesn't show variables *outside* lambda
-
- Resolved
-
- relates to
-
JDK-8058227 Debugger has no access to outer variables inside Lambda
-
- Closed
-
(1 relates to)