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.
default value is lost if casted Product Version: NetBeans IDE 6.0.1 (Build 200801291616) Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05 System: SunOS version 5.11 running on sparc; ISO646-US; en (nb) Create a Java Application project, and add a variable with default value like as following. package javaapplication1; public class Main { static double var = (double)100; public static void main(String[] args) { } } Then, create a UML Reversed Engineered Java-Platform Model project from the above project. Class diagram created from Main element includes attribute "var", but its default is "(double)". The value 100 is lost.
Fixed. Checking in uml/core/src/org/netbeans/modules/uml/core/reverseengineering/parsin gfacilities/translation/expression/TypeCastExpression.java; /cvs/uml/core/src/org/netbeans/modules/uml/core/reverseengineering/parsingfacili ties/translation/expression/Attic/TypeCastExpression.java,v <-- TypeCastExpres sion.java new revision: 1.2.6.2; previous revision: 1.2.6.1 and author lvv@netbeans.org Tue Feb 19 17:54:48 2008 -0800 (8 minutes ago) changeset 68293 834d9e18b1b1 parent 68273 7f9c882d140f child 68294 fa28ea86a60f Fix for 126581 default value is lost if casted
Fix verified in 6.1 build 200802250003
The fix has been ported into the release601_fixes branch. Checking in TypeCastExpression.java; /cvs/uml/core/src/org/netbeans/modules/uml/core/reverseengineering/parsingfacilities/translation/expression/Attic/TypeCastExpression.java,v <-- TypeCastExpression.java new revision: 1.3.10.1; previous revision: 1.3 done