Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 564696

Summary: [14] Refactor -> Rename bug
Product: [Eclipse Project] JDT Reporter: Paul Nahay <pnahay>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: noopur_gupta
Version: 4.16   
Target Milestone: ---   
Hardware: PC   
OS: Windows 10   
Whiteboard:

Description Paul Nahay CLA 2020-06-26 15:03:29 EDT
/**
 * Demonstrates a weird Eclipse 2020-06 bug, using JDK 14.0.1.
 * 
 * In the code given below, "Refactor -> Rename..." doesn't work if I attempt to
 * rename variable "array".
 * 
 * However, it DOES work if I do NOT refer to to the "length" property of
 * "array" in the constructor.
 * 
 * @author Paul Nahay, begun 6/26/2020.
 *
 */
public class EclipseBug {

	int[] array = new int[3];

	EclipseBug() {
		/* This line is fine, it does NOT prevent renaming of "array": */
		System.out.println(array);

		/*
		 * This line PREVENTS the renaming of "array". Remove the line, and
		 * "array" may be renamed via "Refactor -> Rename..."
		 */
		System.out.println(array.length);
	}

}
Comment 1 Noopur Gupta CLA 2020-06-29 03:11:18 EDT
I see the same exception as bug 564329 on trying your example. Please check with the latest I-build if the issue is fixed.

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