[
https://issues.apache.org/jira/browse/NETBEANS-1021?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Reema Taneja updated NETBEANS-1021:
-----------------------------------
Description:
Use explicit parameters type hint throws below exception if lambda expression
uses a mix of explicit and implicit var type((support added in jdk11)) params.
Eg. IntBinaryOperator op = (int x, var y) -> x+ y;
If lambda expr params are like (int x, y), i.e. mix of explicit and implicit
params, Convert to
explicit type hint is not shown.
Investigate if we can convert to explicit type for all mixed types params
containing var type or hide the hint.
Exception:
java.lang.AssertionError: unexpected type: <any?>
at
jdk.compiler/com.sun.tools.javac.tree.TreeMaker.Type(TreeMaker.java:788)
at
org.netbeans.modules.java.source.builder.TreeFactory.Type(TreeFactory.java:800)
at org.netbeans.api.java.source.TreeMaker.Type(TreeMaker.java:1083)
at
org.netbeans.modules.java.hints.suggestions.Lambda$AddExplicitLambdaParameterTypes.performRewrite(Lambda.java:627)
at org.netbeans.spi.java.hints.JavaFix$1.process(JavaFix.java:171)
at
org.netbeans.modules.java.hints.spiimpl.JavaFixImpl$1.run(JavaFixImpl.java:80)
at
org.netbeans.modules.java.hints.spiimpl.JavaFixImpl$1.run(JavaFixImpl.java:74)
at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:672)
at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:662)
was:
Convert to explicit type hint throws below exception if lambda expression uses
a mix of explicit and implicit var type((support added in jdk11)) params.
Eg. IntBinaryOperator op = (int x, var y) -> x+ y;
If lambda expr params are like (int x, y), i.e. mix of explicit and implicit
params, Convert to
explicit type hint is not shown.
Investigate if we can convert to explicit type for all mixed types params
containing var type or hide the hint.
Exception:
java.lang.AssertionError: unexpected type: <any?>
at
jdk.compiler/com.sun.tools.javac.tree.TreeMaker.Type(TreeMaker.java:788)
at
org.netbeans.modules.java.source.builder.TreeFactory.Type(TreeFactory.java:800)
at org.netbeans.api.java.source.TreeMaker.Type(TreeMaker.java:1083)
at
org.netbeans.modules.java.hints.suggestions.Lambda$AddExplicitLambdaParameterTypes.performRewrite(Lambda.java:627)
at org.netbeans.spi.java.hints.JavaFix$1.process(JavaFix.java:171)
at
org.netbeans.modules.java.hints.spiimpl.JavaFixImpl$1.run(JavaFixImpl.java:80)
at
org.netbeans.modules.java.hints.spiimpl.JavaFixImpl$1.run(JavaFixImpl.java:74)
at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:672)
at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:662)
> use explicit params type throws exception for invalid lambda params types
> -------------------------------------------------------------------------
>
> Key: NETBEANS-1021
> URL: https://issues.apache.org/jira/browse/NETBEANS-1021
> Project: NetBeans
> Issue Type: Task
> Reporter: Reema Taneja
> Assignee: Reema Taneja
> Priority: Minor
> Labels: JDK11-VarInLambda
>
> Use explicit parameters type hint throws below exception if lambda expression
> uses a mix of explicit and implicit var type((support added in jdk11)) params.
> Eg. IntBinaryOperator op = (int x, var y) -> x+ y;
> If lambda expr params are like (int x, y), i.e. mix of explicit and implicit
> params, Convert to
> explicit type hint is not shown.
> Investigate if we can convert to explicit type for all mixed types params
> containing var type or hide the hint.
> Exception:
> java.lang.AssertionError: unexpected type: <any?>
> at
> jdk.compiler/com.sun.tools.javac.tree.TreeMaker.Type(TreeMaker.java:788)
> at
> org.netbeans.modules.java.source.builder.TreeFactory.Type(TreeFactory.java:800)
> at org.netbeans.api.java.source.TreeMaker.Type(TreeMaker.java:1083)
> at
> org.netbeans.modules.java.hints.suggestions.Lambda$AddExplicitLambdaParameterTypes.performRewrite(Lambda.java:627)
> at org.netbeans.spi.java.hints.JavaFix$1.process(JavaFix.java:171)
> at
> org.netbeans.modules.java.hints.spiimpl.JavaFixImpl$1.run(JavaFixImpl.java:80)
> at
> org.netbeans.modules.java.hints.spiimpl.JavaFixImpl$1.run(JavaFixImpl.java:74)
> at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:672)
> at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:662)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
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