Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-2818

NPE with "Pull Up" refactoring

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 11.1, 11.2
    • None
    • java - Refactoring
    • None

    Description

      An exception is thrown when I try to move a method to the superclass. I'm using Netbeans 11.1 beta 3.

      java.lang.NullPointerException
      	at org.netbeans.modules.refactoring.java.plugins.PullUpTransformer.addMemberToTarget(PullUpTransformer.java:208)
      	at org.netbeans.modules.refactoring.java.plugins.PullUpTransformer.addMembersToTarget(PullUpTransformer.java:114)
      	at org.netbeans.modules.refactoring.java.plugins.PullUpTransformer.visitClass(PullUpTransformer.java:82)
      	at org.netbeans.modules.refactoring.java.plugins.PullUpTransformer.visitClass(PullUpTransformer.java:57)
      	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:808)
      	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
      	at org.netbeans.modules.refactoring.java.spi.RefactoringVisitor.scan(RefactoringVisitor.java:192)
      	at org.netbeans.modules.refactoring.java.spi.RefactoringVisitor.scan(RefactoringVisitor.java:76)
      	at jdk.compiler/com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
      	at jdk.compiler/com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:113)
      	at jdk.compiler/com.sun.source.util.TreeScanner.visitCompilationUnit(TreeScanner.java:144)
      	at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:591)
      	at jdk.compiler/com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
      	at org.netbeans.modules.refactoring.java.spi.RefactoringVisitor.scan(RefactoringVisitor.java:192)
      	at org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin$TransformTask.run(JavaRefactoringPlugin.java:443)
      	at org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin$TransformTask.run(JavaRefactoringPlugin.java:408)
      	at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:673)
      	at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:663)
      	at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:502)
      	at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
      	at org.netbeans.modules.parsing.api.ParserManager$MultiUserTaskAction.run(ParserManager.java:166)
      	at org.netbeans.modules.parsing.api.ParserManager$MultiUserTaskAction.run(ParserManager.java:138)
      	at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:181)
      	at org.netbeans.modules.parsing.impl.TaskProcessor$2.call(TaskProcessor.java:178)
      	at org.netbeans.modules.masterfs.filebasedfs.utils.FileChangedManager.priorityIO(FileChangedManager.java:153)
      	at org.netbeans.modules.masterfs.providers.ProvidedExtensions.priorityIO(ProvidedExtensions.java:335)
      	at org.netbeans.modules.parsing.nb.DataObjectEnvFactory.runPriorityIO(DataObjectEnvFactory.java:118)
      	at org.netbeans.modules.parsing.impl.Utilities.runPriorityIO(Utilities.java:67)
      	at org.netbeans.modules.parsing.impl.TaskProcessor.runUserTask(TaskProcessor.java:178)
      	at org.netbeans.modules.parsing.api.ParserManager.parse(ParserManager.java:83)
      	at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:452)
      	at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:423)
      	at org.netbeans.api.java.source.JavaSource.runModificationTask(JavaSource.java:684)
      	at org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.processFiles(JavaRefactoringPlugin.java:317)
      	at org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.processFiles(JavaRefactoringPlugin.java:263)
      	at org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.processFiles(JavaRefactoringPlugin.java:245)
      	at org.netbeans.modules.refactoring.java.spi.JavaRefactoringPlugin.createAndAddElements(JavaRefactoringPlugin.java:326)
      	at org.netbeans.modules.refactoring.java.plugins.PullUpRefactoringPlugin.prepare(PullUpRefactoringPlugin.java:261)
      [catch] at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare2(AbstractRefactoring.java:417)
      	at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare(AbstractRefactoring.java:401)
      	at org.netbeans.modules.refactoring.api.AbstractRefactoring.prepare(AbstractRefactoring.java:212)
      	at org.netbeans.modules.refactoring.spi.impl.ParametersPanel$Prepare.run(ParametersPanel.java:1063)
      	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
      	at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
      	at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
      	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            aldobrucale Aldo Brucale
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: