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 243295 - Inspect and Transform -> JDK Migration -> Add underscores removes negative sign (-)
Summary: Inspect and Transform -> JDK Migration -> Add underscores removes negative si...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.0
Hardware: PC Linux
: P2 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-26 15:15 UTC by minborg
Modified: 2014-05-25 01:30 UTC (History)
0 users

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 minborg 2014-03-26 15:15:46 UTC
Product Version = NetBeans IDE 8.0 (Build 201403101706)
Operating System = Linux version 3.11.0-18-generic running on amd64
Java; VM; Vendor = 1.8.0
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.0-b70

Inspect and Transform -> JDK Migration -> Add underscores erroneously removed negative sign!

To reproduce: create a Java class 

public class TestConstants {

    public final long A = 123456789;
    public final long B = -123456789;

}

and perform the Transformation above. Gives :

public class TestConstants {

    public final long A = 123_456_789;
    public final long B = 123_456_789; // NOTE THE MISSING SIGN!!!!

}


But should be 

public class TestConstants {

    public final long A = 123_456_789;
    public final long B = -123_456_789; 

}
Comment 1 Jiri Prox 2014-05-23 07:36:18 UTC
reproducible
Comment 2 Svata Dedic 2014-05-23 13:06:40 UTC
fixed in jet-main#e7d382e53375

Marking as P2 as the error may go unnoticed and corrupt user code's semantic.
Comment 3 Quality Engineering 2014-05-25 01:30:42 UTC
Integrated into 'main-silver', will be available in build *201405250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e7d382e53375
User: Svata Dedic <sdedic@netbeans.org>
Log: #243295: retained sign which is part of the literal + whitespaces before the actual number