JDK 9 RFR of JDK-8173609: Elements.printElements needs to support modules

Jonathan Gibbons jonathan.gibbons at oracle.com
Mon Jan 30 22:30:00 UTC 2017


Remi,

That sounds like interesting feedback for the streams() folk. I don't 
this we can rely on most folk making informed judgements based on 
implementation details :-(

-- Jon


On 01/30/2017 02:26 PM, Remi Forax wrote:
> Jon, all,
> i've found that Streams are great until you use polymorphic methods in lambdas that are parameters of map(), flatMap(), filter() etc because when you debug, the stacktrace will be quite big, and jump on methods you have no control over.
> So i tend to use Stream in my code when the stream call methods i know the implementations and use loops otherwise.
>
> Rémi
>
> ----- Mail original -----
>> De: "Jonathan Gibbons" <jonathan.gibbons at oracle.com>
>> À: compiler-dev at openjdk.java.net
>> Envoyé: Lundi 30 Janvier 2017 23:04:57
>> Objet: Re: JDK 9 RFR of JDK-8173609: Elements.printElements needs to support	modules
>> On 01/29/2017 12:55 PM, joe darcy wrote:
>>> Hi Remi,
>>>
>>>
>>> On 1/29/2017 3:21 AM, Remi Forax wrote:
>>>> Hi Joe,
>>>> i believe that all non public methods you have added can be declared
>>>> private,
>>> Good point; I'll make that change before pushing.
>>>
>>>> and printNameableList can use a stream and a collector
>>>>
>>>>     private void printNameableList(List<? extends QualifiedNameable>
>>>> nameables) {
>>>> writer.print(nameables.stream().map(QualifiedNameable::getQualifiedName).collect(Collectors.joining(",
>>>> "));
>>> I thought of using that style instead and changed some core reflection
>>> code to use streams and collectors earlier in 9 (JDK-8162817:
>>> Annotation toString output not reusable for source input).
>>>
>>> I'll let Jon or Jan weigh in on which style is preferred for javac.
>> We recently did a pass over javac code to modernize code, so these days,
>> I think streams and collectors are fine. The primary criteria are regard
>> for the bootstrap process, and no large destabilizing changes that might
>> advesely impact forward/backward parts at the beginning of a release cycle.
>>
>> We can maybe quibble over the formatting: one line, or one line per
>> chained method.  :-)
>>
>> -- Jon
>>
>>> Thanks,
>>>
>>> -Joe
>>>
>>>>     }
>>>>
>>>> cheers,
>>>> Rémi
>>>>
>>>> ----- Mail original -----
>>>>> De: "joe darcy" <joe.darcy at oracle.com>
>>>>> À: compiler-dev at openjdk.java.net
>>>>> Envoyé: Samedi 28 Janvier 2017 22:39:26
>>>>> Objet: JDK 9 RFR of JDK-8173609: Elements.printElements needs to
>>>>> support    modules
>>>>> Hello,
>>>>>
>>>>> Please review the straightforward fix to address:
>>>>>
>>>>>       JDK-8173609: Elements.printElements needs to support modules
>>>>>       http://cr.openjdk.java.net/~darcy/8173609.0/
>>>>>
>>>>> Once additional information about modules is available (JDK-8172810:
>>>>> ModuleElement should declare and provide appropriate modifiers), the
>>>>> printing processor should be updated to expose that information.
>>>>>
>>>>> Admittedly this changeset would be better with some regression testing.
>>>>>
>>>>> Thanks,
>>>>>
>>>>> -Joe



More information about the compiler-dev mailing list