Hi Emilian,

I deleted the collect line but it is same, for you to try below is BEFORE :

List<String> myList =
           Arrays.asList("a1", "a2", "b1", "c2", "c1");

        myList
           .stream()
           .filter(s -> s.startsWith("c"))
           .map(String::toUpperCase)
           .sorted()
           .collect(Collectors.toList());

AFTER should be :


        List<String> myList =
           Arrays.asList("a1", "a2", "b1", "c2", "c1");

        List<String> collect2 = myList
           .stream()
           .filter(s -> s.startsWith("c"))
           .map(String::toUpperCase)
           .sorted()
           .collect(Collectors.toList());


On Tue, Oct 1, 2019 at 11:23 PM Emilian Bold <[email protected]> wrote:

> Why does the collect call underneath your selection have the red
> underline? Seem there is something unparseable about the source code which
> might interfere with your refactoring too.
>
> --emi
>
> mar., 1 oct. 2019, 23:12 Sahin gülci <[email protected]> a scris:
>
>> Hi All,
>>
>> When I try extract local variable from simple stream, it says invalid
>> selection but same code on Intellij and Eclipse create a local variable.
>> How can I extract local variable ?
>>
>> picture on the attachments
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>> For further information about the NetBeans mailing lists, visit:
>> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>

Reply via email to