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 173252 - Renaming class throws AssertionError RenameRefactoringElement.init
Summary: Renaming class throws AssertionError RenameRefactoringElement.init
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: J Bachorik
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks: 173077
  Show dependency tree
 
Reported: 2009-09-29 11:21 UTC by Alexandr Scherbatiy
Modified: 2009-11-02 11:32 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 159217


Attachments
stacktrace (1.10 KB, text/plain)
2009-09-29 11:21 UTC, Alexandr Scherbatiy
Details
stacktrace (1.10 KB, text/plain)
2009-10-30 12:44 UTC, Alexandr Scherbatiy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandr Scherbatiy 2009-09-29 11:21:25 UTC
Build: NetBeans IDE 6.8 Beta (Build 200909281634)
VM: Java HotSpot(TM) Client VM, 14.1-b02, Java(TM) SE Runtime Environment, 1.6.0_15-b03
OS: Windows XP, 5.1, x86

User Comments:
sunflower: - Copy the code to the editor:
-------------------------------------------------------------------------------------------
class Node{
    public var content:String;
    public var head:Node;

    function print(){
            print(head);
            
    }

    function print(elem:Node):Void{
        if(elem != null){
            println(elem);
            print(elem);
        }
    }

}
- Refactor -> Rename the Node class to Element

The Exception pops up



Stacktrace: 
java.lang.AssertionError
        at org.netbeans.modules.javafx.refactoring.impl.RenameRefactoringElement.init(RenameRefactoringElement.java:276)
        at org.netbeans.modules.javafx.refactoring.impl.RenameRefactoringElement.<init>(RenameRefactoringElement.java:100)
        at org.netbeans.modules.javafx.refactoring.impl.RenameRefactoringElement.create(RenameRefactoringElement.java:88)
        at org.netbeans.modules.javafx.refactoring.impl.plugins.RenameRefactoringPlugin.prepare(RenameRefactoringPlugin.java:239)
        at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare2(AbstractRefactoring.java:419)
        at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare(AbstractRefactoring.java:403)
Comment 1 Alexandr Scherbatiy 2009-09-29 11:21:48 UTC
Created attachment 88500 [details]
stacktrace
Comment 2 J Bachorik 2009-09-30 12:57:46 UTC
fixed in http://hg.netbeans.org/javafx/rev/8968feb02c0e
Comment 3 Alexandr Scherbatiy 2009-10-02 12:44:13 UTC
verified in netbeans-trunk-nightly-200910010513-javafx-full.zip 
Comment 4 Alexandr Scherbatiy 2009-10-30 12:43:58 UTC
Build: NetBeans IDE Dev (Build 200910291407)
VM: Java HotSpot(TM) Client VM, 14.1-b02, Java(TM) SE Runtime Environment, 1.6.0_15-b03
OS: Windows XP, 5.1, x86

User Comments: 
Steps to reproduce:
- Copy the code to the editor:
----------------------------------------------------------------------------------------------------------------------------
import java.lang.Comparable;

def INFINITY = Number.MAX_VALUE;

public function sign(y:Number):Integer {
    if( y <0 ) { -1 } else if(0 < y) { 1 } else { 0 }
}

class DVertex extends Comparable{

    //var vertex:Vertex;

    var value:Number;
    var previous:Integer;

    override function compareTo(obj:Object):Integer{
            var vertex = obj as DVertex;
            return sign(value - vertex.value);
    }

}

class Vertex{}
class Edge{}
class Graph{  var vertices:Vertex[] }

public function dijkstraShortestPath(source:Vertex, destination:Vertex, graph:Graph):Edge[]{


    var vertices = for(v in graph.vertices) DVertex{
        previous: indexof v
        value: if( v == source) then  0  else INFINITY
    };

    return [];
}
------------------------------------------------------------------------------

Stacktrace: 
java.lang.AssertionError
        at org.netbeans.modules.javafx.refactoring.impl.RenameRefactoringElement.init(RenameRefactoringElement.java:274)
        at org.netbeans.modules.javafx.refactoring.impl.RenameRefactoringElement.<init>(RenameRefactoringElement.java:99)
        at org.netbeans.modules.javafx.refactoring.impl.RenameRefactoringElement.create(RenameRefactoringElement.java:78)
        at org.netbeans.modules.javafx.refactoring.impl.plugins.RenameRefactoringPlugin.prepare(RenameRefactoringPlugin.java:390)
        at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare2(AbstractRefactoring.java:419)
        at org.netbeans.modules.refactoring.api.AbstractRefactoring.pluginsPrepare(AbstractRefactoring.java:403)
Comment 5 Alexandr Scherbatiy 2009-10-30 12:44:03 UTC
Created attachment 90281 [details]
stacktrace
Comment 6 J Bachorik 2009-11-02 11:13:31 UTC
Are you sure you were renaming a class? I tried to rename all of them but without any exceptions. Could you provide
detailed steps?
Comment 7 Alexandr Scherbatiy 2009-11-02 11:21:22 UTC
This issue is in a fixed state.

The last comment was added automatically by the Exception Report dialog.
So I did not open this issue but created the issue 175764 instead.
Comment 8 J Bachorik 2009-11-02 11:32:39 UTC
Sorry, I didn't notice the state :(