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 70463

Summary: Lost information during Push Down refac
Product: java Reporter: Milan Kubec <mkubec>
Component: UnsupportedAssignee: issues@java <issues>
Status: VERIFIED FIXED    
Severity: blocker CC: msauer
Priority: P2    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Milan Kubec 2005-12-15 12:51:24 UTC
[release50-200512142030, JDK 1.5.0_06]

Steps to reproduce:
1) Have following class and super class:

public class B {
    public B() {
    }
    public double d() {
        return 123.0d;
    }
    public float f() {
        return 123.0f;
    }   
}

public class A extends B {
    public A() {
    }   
}

2) Invoke Push Down refac in class B, select all items and finish refactoring

Result is:

public class A extends B {
    public A() {
    }
    public double d() {
        return 123.0;
    }
    public float f() {
        return 123.0;
    }   
}

Note missing 'f' and 'd' in return statements. Source is not compilable.
Doesn't hapen when doing Pull Up on the same classes.
Comment 1 Tomas Hurka 2005-12-16 14:50:58 UTC
Fixed in trunk. float literal now suffixed with letter 'f'.  'd' suffix is optional for double literal so the current 
implementation is correct.
Checking in FloatLiteralImpl.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/FloatLiteralImpl.java,v  <--  
FloatLiteralImpl.java
new revision: 1.5; previous revision: 1.4
done
Comment 2 Jan Becicka 2005-12-16 16:37:54 UTC
This patch is OK.
Comment 3 Milan Kubec 2005-12-19 10:51:55 UTC
Fix verified in dev-200512181900.
Comment 4 Tomas Hurka 2005-12-19 13:48:47 UTC
Fixed in release50 branch.

Checking in FloatLiteralImpl.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/FloatLiteralImpl.java,v  <--  
FloatLiteralImpl.java
new revision: 1.4.46.1; previous revision: 1.4
done
Comment 5 Max Sauer 2005-12-22 09:10:52 UTC
Verified in 5.0 200512212030 && 5.1 200512211900.
Comment 6 Quality Engineering 2007-09-20 12:09:34 UTC
Reorganization of java component