RFR 8171981: JShell: Fails compilation: new Object().getClass().getSuperclass()

Maurizio Cimadamore maurizio.cimadamore at oracle.com
Mon Jan 9 11:10:10 UTC 2017


Looks good. As we discussed privately, on lines 177 and 186, I think we 
want to use List.map instead of List.stream().map(). Note that List.map 
returns the original instance if map() doesn't change any of the 
elements, which then enables a simpler == comparison. This seems like a 
mistake in the JEP-286 code.

Maurizio


On 08/01/17 20:22, Robert Field wrote:
> Please review....
>
> Bug:
>
>     https://bugs.openjdk.java.net/browse/JDK-8171981
>
> Webrev:
>
>     http://cr.openjdk.java.net/~rfield/8171981v0.webrev/
>
> Notes:
>
> There were two different mechanisms for determining type: one used in 
> evaluation and one available in the API.  Both had 
> limitations/problems.  Both used TypePrinter which was the cause of 
> the reported problem.
>
> I've unified handling, discarded both old approaches, using a visitor 
> instead.
> I've separated var type name determination (used in code generation -- 
> no type variables) from other type printing (used in docs).
> Adopted Maurizo's handling of captured types.
> Added debugging support for wraps.
> Added lots more tests, including tests inspired by JEP-286.  All new 
> tests, test both entry-points.
> Thanks Maurizio and Dan!
>



More information about the kulla-dev mailing list