Output of expression values <was> Re: Printing of array-valued elements
Robert Field
robert.field at oracle.com
Fri Aug 7 01:18:59 UTC 2015
> On Aug 6, 2015, at 1:33 PM, Paul Sandoz <paul.sandoz at oracle.com> wrote:
>
>
> On 5 Aug 2015, at 17:09, Robert Field <robert.field at oracle.com> wrote:
>
>> All good suggestions, thanks, created:
>>
>> 8133020 <https://bugs.openjdk.java.net/browse/JDK-8133020>
>> JShell API: special printing for arrays
>>
>
> Same applies to Collection as well (not sure we can always do the same for Iterable given it might be traversable once only in some rare cases).
>
> I think there should also be truncation for toString beyond a certain length e.g.: it could be something like (aligned to the columns for a certain number of rows):
>
> -> Stream.generate(() -> "A").limit(10000).collect(Collectors.joining(""));
> | String $1 = “AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
> AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
> AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA…"
Added to bug and Subject changed
>
> IMO the current output is rather verbose:
>
> -> new Object()
> | Expression value is: java.lang.Object at 2812cbfa
> | assigned to temporary variable $5 of type Object
>
> It could be (for default verbosity settings):
>
> -> new Object()
> | Object $5 = java.lang.Object at 2812cbfa
>
> ?
>
> Paul.
See UX discussion.
-Robert
More information about the kulla-dev
mailing list