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

Code Generator Failed to "Generate Instance" method

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 9.0
    • None

    Description

      Expected

      • Use ALT/Insert to generate missing interface method
      • Select "Implement Method"
      • Select 2 x methods to be generate
        • One method does NOT exist
        • Another method Did exist
      • Press Generate
      • Generate the absent method(s)
      • Display some kind of error message for existing method(s).

      Actual

      • GeneratorUtils crashed
      • Nothing happened – Especially no message to tell me nothing was generated.

      supporting material

      Stack Dump follows ....

      org.netbeans.modules.java.editor.codegen.GeneratorUtils$DuplicateMemberException: Class member already exists
      	at org.netbeans.modules.java.editor.codegen.GeneratorUtils.insertClassMembers(GeneratorUtils.java:173)
      	at org.netbeans.modules.java.editor.codegen.GeneratorUtils.generateAbstractMethodImplementations(GeneratorUtils.java:94)
      	at org.netbeans.modules.java.editor.codegen.ImplementOverrideMethodGenerator$3.run(ImplementOverrideMethodGenerator.java:299)
      	at org.netbeans.modules.java.editor.codegen.ImplementOverrideMethodGenerator$3.run(ImplementOverrideMethodGenerator.java:279)
      	at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:672)
      	at org.netbeans.api.java.source.JavaSource$1.run(JavaSource.java:662)
      	at org.netbeans.api.java.source.JavaSource$MultiTask.run(JavaSource.java:501)
      	at org.netbeans.modules.parsing.impl.TaskProcessor.callUserTask(TaskProcessor.java:586)
      	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:130)
      	at org.netbeans.modules.parsing.api.ParserManager$UserTaskAction.run(ParserManager.java:114)
      	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:81)
      	at org.netbeans.api.java.source.JavaSource.runUserActionTaskImpl(JavaSource.java:451)
      	at org.netbeans.api.java.source.JavaSource.runUserActionTask(JavaSource.java:422)
      	at org.netbeans.api.java.source.JavaSource.runModificationTask(JavaSource.java:683)
      	at org.netbeans.modules.java.editor.codegen.ImplementOverrideMethodGenerator.invoke(ImplementOverrideMethodGenerator.java:279)
      	at org.netbeans.modules.editor.codegen.GenerateCodePanel.invokeSelected(GenerateCodePanel.java:165)
      	at org.netbeans.modules.editor.codegen.GenerateCodePanel.listKeyPressed(GenerateCodePanel.java:121)
      	at org.netbeans.modules.editor.codegen.GenerateCodePanel.access$200(GenerateCodePanel.java:41)
      	at org.netbeans.modules.editor.codegen.GenerateCodePanel$4.keyPressed(GenerateCodePanel.java:95)
      	at java.desktop/java.awt.AWTEventMulticaster.keyPressed(AWTEventMulticaster.java:258)
      	at java.desktop/java.awt.Component.processKeyEvent(Component.java:6547)
      	at java.desktop/javax.swing.JComponent.processKeyEvent(JComponent.java:2849)
      	at java.desktop/java.awt.Component.processEvent(Component.java:6366)
      	at java.desktop/java.awt.Container.processEvent(Container.java:2260)
      	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4966)
      	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2318)
      	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4798)
      	at java.desktop/java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1950)
      	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:871)
      	at java.desktop/java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1140)
      	at java.desktop/java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:1010)
      	at java.desktop/java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:836)
      	at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:4847)
      	at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2318)
      	at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
      	at java.desktop/java.awt.Component.dispatchEvent(Component.java:4798)
      	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
      	at java.desktop/java.awt.EventQueue.access$600(EventQueue.java:97)
      	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
      	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
      	at java.base/java.security.AccessController.doPrivileged(Native Method)
      	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
      	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:97)
      	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
      	at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
      	at java.base/java.security.AccessController.doPrivileged(Native Method)
      	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
      	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
      	at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
      [catch] at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
      	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
      	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
      	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
      	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
      	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            aplatypus aplatypus
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: