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 228491 - Introduce Variable refactoring: positioning problem
Summary: Introduce Variable refactoring: positioning problem
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-11 17:43 UTC by mclaborn
Modified: 2016-07-07 07:17 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 mclaborn 2013-04-11 17:43:18 UTC
Product Version = NetBeans IDE 7.3 (Build 201302132200)
Operating System = Linux version 3.2.0-40-generic running on amd64
Java; VM; Vendor = 1.7.0_10
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.6-b04

Position of refactored code completely inappropriate in this instance.

BEFORE:
    // check for a deferred credit card refund, and get some diagnostics
    if (true) { // was (isCCProfile() && getAmount() < 0.0 && isDeferPayment()) {
      log.error("Saving deferred credit card refund??? " + this.toString(4), new Exception());
    }

highlight 

"Saving deferred credit card refund??? " + this.toString(4)

AFTER
    // check for a deferred credit card refund, and get some diagnostics
    if (true) { String l_msg = "Saving deferred credit card refund??? " + this.toString(4);
// was (isCCProfile() && getAmount() < 0.0 && isDeferPayment()) {
      log.error(l_msg, new Exception());
    }


The new line of code was placed immediately after the opening brace on the if statement.  It should have been right after the if statement line with its comments.
Comment 1 Martin Balin 2016-07-07 07:17:53 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss