RFR 8166400: JShell: friendlier representation of array values

Robert Field robert.field at oracle.com
Thu Sep 22 05:46:14 UTC 2016


Arrays can't be used because that is based on compile-time type.

Array can be used.  I was resistant to using reflection.  But that sure 
reduces the code.  Here is the new webrev:

     http://cr.openjdk.java.net/~rfield/8166400v1.webrev/

(Test is unchanged).

-Robert

P.S. The representation is getting positive reviews


On 09/21/16 22:03, Sundararajan Athijegannathan wrote:
> Can reflection be used to avoid that switch case (Array.getLength,
> Array.get())? Or perhaps java.util.Arrays.toString overloads may be used
> (slightly different output "[]" instead of "{}")?
>
> -Sundar
>
>
> On 9/22/2016 7:38 AM, Robert Field wrote:
>> Please review --
>>
>> Bug:
>>     https://bugs.openjdk.java.net/browse/JDK-8166400
>>
>> Webrev:
>>      http://cr.openjdk.java.net/~rfield/8166400v0.webrev/
>>
>> Robert
>>



More information about the kulla-dev mailing list