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 175764 - Renaming attribute throws AssertionError RenameRefactoringElement.init
Summary: Renaming attribute throws AssertionError RenameRefactoringElement.init
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: J Bachorik
URL:
Keywords:
Depends on:
Blocks: 173077
  Show dependency tree
 
Reported: 2009-10-30 12:46 UTC by Alexandr Scherbatiy
Modified: 2009-11-16 06:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log file (53.07 KB, text/plain)
2009-10-30 12:48 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-10-30 12:46:35 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

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 1 Alexandr Scherbatiy 2009-10-30 12:48:31 UTC
Created attachment 90282 [details]
IDE log file
Comment 2 J Bachorik 2009-10-30 17:42:22 UTC
Which attribute?
Comment 3 Alexandr Scherbatiy 2009-11-02 09:48:33 UTC
Sorry.

- Rename the 'value' attribute of the 'DVertex' class to 'value2' 
Comment 4 J Bachorik 2009-11-09 04:11:23 UTC
Despite the log message it is fixed in http://hg.netbeans.org/javafx/rev/65cc4107b979
Comment 5 Alexandr Scherbatiy 2009-11-16 06:57:04 UTC
verified in Build 200911160201