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 - Lost information during Push Down refac
Summary: Lost information during Push Down refac
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-15 12:51 UTC by Milan Kubec
Modified: 2007-09-26 09:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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