You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by "Austin Stephens (Jira)" <ji...@apache.org> on 2021/08/12 17:06:00 UTC

[jira] [Created] (NETBEANS-5920) org.netbeans.api.java.source.TreeUtilities$5 does not implement method 'abstract java.lang.Object visitSwitchExpression(com.sun.source.tree.SwitchExpressionTree, java.lang.Object)' of interface com.sun.source.tree.TreeVisitor

Austin Stephens created NETBEANS-5920:
-----------------------------------------

             Summary: org.netbeans.api.java.source.TreeUtilities$5 does not implement method 'abstract java.lang.Object visitSwitchExpression(com.sun.source.tree.SwitchExpressionTree, java.lang.Object)' of interface com.sun.source.tree.TreeVisitor
                 Key: NETBEANS-5920
                 URL: https://issues.apache.org/jira/browse/NETBEANS-5920
             Project: NetBeans
          Issue Type: Bug
          Components: java - Refactoring
    Affects Versions: 12.4
            Reporter: Austin Stephens


Error from the refactoring dialog:

 
{noformat}
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.{noformat}
All you need to do to break this is to try to refactor->move this method to another class

 
{code:java}
private int moveMe(){
	String s = "foo";
	int num = switch(s){
		case "foo" -> 0;
		case "bar" -> 1;
		default -> -1;
	};
	return num;
}
{code}
 

 

 



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

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

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