This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 62049

Summary: NoSuchElementException when extracting super class from file with more top elements
Product: editor Reporter: Jiri Prox <jiriprox>
Component: RefactoringAssignee: issues@java <issues>
Status: VERIFIED DUPLICATE    
Severity: blocker    
Priority: P3    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Exception

Description Jiri Prox 2005-08-10 14:53:26 UTC
NB 4.2 (200508091800)
JDK 1.5.0_04

NoSuchElementException is thrown when extracting super class from file with more
top elements.

Steps to reproduce:
1) create new file containig two classes
public class ClassA {
    public void method1(int x) { }        
}

class TopElement  {
    public void method2(int y) { }
}

2) call Extract Interface
3) type some name and confirm

-> refactoring is performed but exception is thrown in console and undo
refactoring is disabled

java.util.NoSuchElementException
        at java.util.LinkedList.getFirst(LinkedList.java:109)
        at
org.netbeans.modules.javacore.internalapi.UndoManager.addItem(UndoManager.java:267)
Comment 1 Jiri Prox 2005-08-10 14:55:31 UTC
Created attachment 23643 [details]
Exception
Comment 2 Tomas Hurka 2005-08-19 15:39:45 UTC

*** This issue has been marked as a duplicate of 61510 ***
Comment 3 Jiri Prox 2006-01-17 13:35:04 UTC
verified duplicate