[jira] [Comment Edited] (NETBEANS-3966) Missing to show in editor where is problem

2020-12-09 Thread Netbeans User 2019 (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-3966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17113128#comment-17113128
 ] 

Netbeans User 2019 edited comment on NETBEANS-3966 at 12/9/20, 1:07 PM:


Another example:

public class Example {
public void methodA(String str) {
java.util.Optional.ofNullable(str)
.flatMap(this::getMyObject); //missing reporting of error on 
such line
}
public java.util.Optional getMyObject() {
return null;
}
}

And only shown error on tab (indicator) and in Action items "Error incompatible 
types: invalid method reference method getMyObject in class", but nothing 
inside editor itself.


was (Author: nb-user-2019):
Another example:

{{public class Example {}}{{    public void methodA(String str) {
     java.util.Optional.ofNullable(str)
     .filter((s)->s.startsWith("example"))
     .flatMap(this::getMyObject)
     .ifPresent((o)->

{     o.someMethod(str);     }

);
     }}}{{    public java.util.Optional getMyObject() {}}{{   
 return java.util.Optional.empty();
     }}}{{    public static class MyObject {}}{{    public void 
someMethod(String str) {}}{\{    }
     }
 }}}

 

And only shown error on tab (indicator) and in Action items "Error incompatible 
types: invalid method reference method getMyObject in class", but nothing 
inside editor itself.

> Missing to show in editor where is problem
> --
>
> Key: NETBEANS-3966
> URL: https://issues.apache.org/jira/browse/NETBEANS-3966
> Project: NetBeans
>  Issue Type: Bug
>  Components: java - Compiler, java - Editor, platform - Action Items
>Affects Versions: 12.0, 11.2, 11.3
> Environment: OpenJDK 11.0.2
> Gradle 6.4.1
>Reporter: Netbeans User 2019
>Priority: Major
>  Labels: compiler
>
> public static void main(String[] args) {
>  
>  List z = List.of(1,2,3);
>  z.stream()
>  .map(SandboxTemp1::ou)
>  .toString();
> }
> private static int ou(String o) {
>  return 0;
> }
> There is missing to be shown as error on such line.
> It is seen as issue in action items and red indicator in tab next name of 
> file, but no issue shown in editor itself.
> In actions items you can see:
> Error incompatible types: invalid method reference incompatible types: 
> java.lang.Integer cannot be converted to java.lang.String ... :23
> This is not one case, but this happens for different types so not only that 
> one from example.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



[jira] [Comment Edited] (NETBEANS-3966) Missing to show in editor where is problem

2020-05-21 Thread Netbeans User 2019 (Jira)


[ 
https://issues.apache.org/jira/browse/NETBEANS-3966?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17113128#comment-17113128
 ] 

Netbeans User 2019 edited comment on NETBEANS-3966 at 5/21/20, 12:10 PM:
-

Another example:

{{public class Example {}}{{    public void methodA(String str) {
     java.util.Optional.ofNullable(str)
     .filter((s)->s.startsWith("example"))
     .flatMap(this::getMyObject)
     .ifPresent((o)->

{     o.someMethod(str);     }

);
     }}}{{    public java.util.Optional getMyObject() {}}{{   
 return java.util.Optional.empty();
     }}}{{    public static class MyObject {}}{{    public void 
someMethod(String str) {}}{\{    }
     }
 }}}

 

And only shown error on tab (indicator) and in Action items "Error incompatible 
types: invalid method reference method getMyObject in class", but nothing 
inside editor itself.


was (Author: nb-user-2019):
Another example:

{{public class Example {}}{{    public void methodA(String str) {
    java.util.Optional.ofNullable(str)
    .filter((s)->s.startsWith("example"))
    .flatMap(this::getMyObject)
    .ifPresent((o)->{
    o.someMethod(str);
    });
    }}}{{    public java.util.Optional getMyObject() {}}{{
    return java.util.Optional.empty();
    }}}{{    public static class MyObject {}}{{    public void 
someMethod(String str) {}}{{    }
    }
}}}

> Missing to show in editor where is problem
> --
>
> Key: NETBEANS-3966
> URL: https://issues.apache.org/jira/browse/NETBEANS-3966
> Project: NetBeans
>  Issue Type: Bug
>  Components: java - Compiler, java - Editor, platform - Action Items
>Affects Versions: 11.2, 11.3
> Environment: Apache Netbeans 11.2 and even 11.3
> OpenJDK 11.0.2
>Reporter: Netbeans User 2019
>Priority: Major
>  Labels: compiler
>
> public static void main(String[] args) {
>  
>  List z = List.of(1,2,3);
>  z.stream()
>  .map(SandboxTemp1::ou)
>  .toString();
> }
> private static int ou(String o) {
>  return 0;
> }
> There is missing to be shown as error on such line.
> It is seen as issue in action items and red indicator in tab next name of 
> file, but no issue shown in editor itself.
> In actions items you can see:
> Error incompatible types: invalid method reference incompatible types: 
> java.lang.Integer cannot be converted to java.lang.String ... :23
> This is not one case, but this happens for different types so not only that 
> one from example.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists