Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
12.4
-
None
-
None
Description
Error from the refactoring dialog:
Module Java Refactoring threw java.lang.AbstractMethodError: Receiver class org.netbeans.api.java.source.TreeUtilities$5 does not define or inherit an implementation of the resolved method 'abstract java.lang.Object visitSwitchExpression(com.sun.source.tree.SwitchExpressionTree, java.lang.Object)' of interface com.sun.source.tree.TreeVisitor.. Please report a bug against Java Refactoring module and attach your var/log/messages.log.
All you need to do to break this is to try to refactor->move this method to another class
private int moveMe(){ String s = "foo"; int num = switch(s){ case "foo" -> 0; case "bar" -> 1; default -> -1; }; return num; }