Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 224716 - Assure that the evaluator and other parts of the Java debugger are up-to-date with the JDK 8 language features.
Assure that the evaluator and other parts of the Java debugger are up-to-date...
Product: debugger
Classification: Unclassified
Component: Java
All All
: P1 (vote)
: 7.4
Assigned To: Martin Entlicher
Depends on:
Blocks: 206487
  Show dependency treegraph
Reported: 2013-01-10 15:52 UTC by Martin Entlicher
Modified: 2013-03-24 21:01 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Martin Entlicher 2013-01-10 15:52:57 UTC
NetBeans Java debugger should work well with the the new JDK 8 language features.
Comment 1 Martin Entlicher 2013-03-15 16:20:40 UTC
Evaluator needs to be able to process:
1. Intersection types,
2. Lambda expressions,
3. Member references.
Comment 2 Martin Entlicher 2013-03-19 17:32:31 UTC
The evaluator is adapted by these changes:
Intersection types are handled by changeset:   248754:df18a035253c
Lambda expressions and member references are recognized by
changeset:   248755:335cc0441395, but they are reported as unsupported,
because it's problematic to create new classes in the target VM.

By default, it's possible to step through Lambda expressions and breakpoints do work in Lambda expressions, but there are several inconveniences:

1. Debugger is suspended twice on Lambda expression declaration during
   When a definition of a Lambda expression is provided as an argument to
   a method, stepping over is suspended on following locations:
   1.1. On the method invocation line
        (if there are other arguments preceding the Lambda expression
   1.2. On the Lambda expression
        (on the arguments paranthesis, or the -> arrow)
   1.3. On the method invocation line.

2. Breakpoint on the method invocation line is hit two times when there
   are other arguments preceding the Lambda expression definition.

3. Step into on a Lambda expression goes to

4. Step over expression does not work inside the Lambda body.

5. Step into with method selection does not work inside the Lambda body.

6. Method breakpoints break on Lambdas, but they suspend on unexpected
   Having a method breakpoint on PropertyChangeListener.propertyChange()
   method and following code:

   PropertyChangeListener pchl =
       (PropertyChangeEvent evt)
   chl.propertyChange(new PropertyChangeEvent("a", "b", "c", "d"));

   The method breakpoint is hit in native method
   and further step into skips from the Lambda body into it's invoked
   methods (into PropertyChangeEvent.getPropertyName() method).
Comment 3 Martin Entlicher 2013-03-21 17:12:41 UTC
7. Step into Lambda implementation does not work correctly.
   Debugger suspends in Integer.valueOf() and after further step skips the
   Lambda body.
Comment 4 Martin Entlicher 2013-03-22 15:26:47 UTC
8. Step that leaves Lambda implementation and goes back to it's caller
   suspends in ClassName$$Lambda$<name> synthetic class. One extra step is
   necessary to get to the caller.
Comment 5 Martin Entlicher 2013-03-22 16:28:57 UTC
Problems 1. and 2. should be fixed by

3. is fixed by changeset:   249185:e9ac310ef3c3

4. and 5. is fixed by changeset:   249187:578dadd91fc0

6. we can probably do nothing about method breakpoint being hit at
   further stepping should work fine - fixed by other changes.

7. is fixed by changeset:   249186:b32557783edb

8. is fixed by changeset:   249188:3b10a731a550

Debugger should work fine with JDK 8 code now.
Comment 6 Quality Engineering 2013-03-24 21:01:43 UTC
Integrated into 'main-golden', will be available in build *201303241718* on (upload may still be in progress)
Log: #224716: Assure that step into on Lambda expression does not go into Java implementation internals.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo