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 254768 - Test II.
Summary: Test II.
Status: RESOLVED DUPLICATE of bug 254448
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-27 08:01 UTC by gokumar
Modified: 2015-08-27 08:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Preview in Refactored ClassA.java (52.78 KB, image/png)
2015-08-27 08:01 UTC, gokumar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gokumar 2015-08-27 08:01:15 UTC
Created attachment 155681 [details]
Preview in Refactored ClassA.java

Link: http://services.netbeans.org/synergy/client/app/#/case/5156/suite/2033

Product Version: NetBeans IDE Dev (Build 201508240002)
Updates: Updates available
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b14
System: Windows 7 version 6.1 running on amd64; Cp1252; en_IN (nb)
User directory: C:\Users\GOKUMAR\AppData\Roaming\NetBeans\dev
Cache directory: C:\Users\GOKUMAR\AppData\Local\NetBeans\Cache\dev

1. Open invert_boolean.ClassA.java
2. Right into m2(...) body and from popup menu select
3. From main menu select Refactor > Invert Boolean..., type new name "method2" and press Preview

Expected Preview in "Refactored ClassA.java":

package invert_boolean;

public class ClassA {

	public void m(){
		System.out.println(!m1(3, 4, 5));
		System.out.println(method2(true, false, true));
	}
	
	public boolean m1(int a, int b, int c){
		if (a * a + b * b == c * c) {
			return false;
		}
		return true;
	}
	
	public boolean method2(boolean a, boolean b, boolean c){
		return (a && b) || (b && c) || ((2 > 3) && (4 < 1));
	}
}

Actual Preview in "Refactored ClassA.java":

<its empty> (I have attached snapshot of it)

4. If I click on "Do Refactor", the refactoring functionality actually works fine.
Comment 1 Jiri Prox 2015-08-27 08:26:00 UTC

*** This bug has been marked as a duplicate of bug 254448 ***