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 177301 - AssertionError at org.netbeans.modules.javafx.refactoring.impl.RenameRefactoringElement.init
Summary: AssertionError at org.netbeans.modules.javafx.refactoring.impl.RenameRefactor...
Status: VERIFIED FIXED
Alias: None
Product: javafx
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 6.x
Hardware: All All
: P1 normal (vote)
Assignee: J Bachorik
URL:
Keywords: REGRESSION
Depends on:
Blocks:
 
Reported: 2009-11-20 07:27 UTC by Alexandr Scherbatiy
Modified: 2009-11-26 08:09 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 162575


Attachments
stacktrace (1.10 KB, text/plain)
2009-11-20 07:28 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-11-20 07:27:57 UTC
This bug was originally marked as duplicate of bug 173252, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE Dev (Build 200911200201)
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: - Refactor-> Rename the 'a' variable to 'c' in the code below
------------------------------------------------------------------------------
var a = 10;
var b = ( a + 10 ) / a;

println("a: {a}")
------------------------------------------------------------------------------
The exception pops up

sunflower: - Copy the attached code to the editor
- Go to the Scale class
- Refactor-> Rename the 'radiusScale' attribute to the 'radiusScale'

The error pops up.

sunflower: 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:279)
        at org.netbeans.modules.javafx.refactoring.impl.RenameRefactoringElement.<init>(RenameRefactoringElement.java:101)
        at org.netbeans.modules.javafx.refactoring.impl.RenameRefactoringElement.create(RenameRefactoringElement.java:80)
        at org.netbeans.modules.javafx.refactoring.impl.plugins.RenameRefactoringPlugin.prepare(RenameRefactoringPlugin.java:383)
        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-11-20 07:28:00 UTC
Created attachment 91429 [details]
stacktrace
Comment 2 Alexandr Scherbatiy 2009-11-20 07:37:33 UTC
Do not read the previous description that is generated by the exception report.

This one does not work:

- Refactor -> Rename the 'a' variable to 'c' in the code below
------------------------------------------------------------------------------
var a = 10;
var b = ( a + 10 ) / a;

println("a: {a}")
------------------------------------------------------------------------------
The exception pops up
Comment 3 J Bachorik 2009-11-21 05:57:44 UTC
This is still the result of http://javafx-jira.kenai.com/browse/JFXC-3494

In addition to that it seems that SOMA compiler generates an empty string literal value as an empty string as opposed to the "" (two quotes) string generated in MARINA - so the workaround introduced in fix for #172145 stopped working.
Basically, this is a regression so if QE will back me up I would increase the priority to P1 in order to get this fixed for FCS
Comment 4 J Bachorik 2009-11-23 05:06:14 UTC
Increasing priority since it is a regression.
I would like to make it 68_HR_FIX_CANDIDATE.
Comment 5 J Bachorik 2009-11-23 06:37:26 UTC
fix delivered - http://hg.netbeans.org/javafx/rev/b33d1b8ce6ef
Comment 6 Alexandr Scherbatiy 2009-11-24 07:51:09 UTC
verified with custom build with the fixes.

The exception is not reproduced.
Comment 7 Karol Harezlak 2009-11-24 08:27:25 UTC
Changeset: http://hg.netbeans.org/javafx/rev/b33d1b8ce6ef

Code reviewed.
Comment 8 Lukas Hasik 2009-11-26 08:09:27 UTC
verified
Product Version: NetBeans IDE 6.8 RC1 (Build 200911252200)