singh-akhilesh commented on a change in pull request #2804:
URL: https://github.com/apache/netbeans/pull/2804#discussion_r599484111
##########
File path:
java/java.hints/src/org/netbeans/modules/java/hints/jdk/ConvertToPatternInstanceOf.java
##########
@@ -89,7 +90,9 @@ public Void visitTypeCast(TypeCastTree node, Void p) {
TypeMirror typeITM =
ctx.getInfo().getTrees().getTypeMirror(typeI);
List<String> varNameCandidates =
org.netbeans.modules.editor.java.Utilities.varNamesSuggestions(typeITM,
ElementKind.LOCAL_VARIABLE, EnumSet.noneOf(Modifier.class), null, null,
ctx.getInfo().getTypes(), ctx.getInfo().getElements(), Collections.emptyList(),
CodeStyle.getDefault(ctx.getInfo().getFileObject()));
String varName = Utilities.makeNameUnique(ctx.getInfo(),
ctx.getInfo().getTrees().getScope(ctx.getPath()), varNameCandidates.get(0));
- Fix fix = new FixImpl(ctx.getInfo(), ctx.getPath(), varName,
false, convertPath).toEditorFix();
+ IfTree it = (IfTree) ctx.getPath().getLeaf();
Review comment:
I believe its better to keep this at least for this release. As many
people using below JDK-16 version. Thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
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