Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. 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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 12.4
    • None
    • java - Refactoring
    • 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;
      }
      

       

       

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            Sir Intellegence Austin Stephens
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: