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

Bug 128760

Summary: [convert anonymous] introduces wrong type parameters if the type had parameterized methods [refactoring]
Product: [Eclipse Project] JDT Reporter: Tom Hofmann <eclipse>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard: stalebug

Description Tom Hofmann CLA 2006-02-21 02:41:32 EST
3.2 M5

- use this CU:

=========== Foo.java ================
public class Foo {
	public static void  create() {
		new Object() {
			public <T> Comparable<T> comp() {
				return null;
			}
		};
	}
}
=====================================

- convert the anonymous type to inner type 'Bar'

> actual result:

	private static class Bar<T> {
		public <T> Comparable<T> comp() {
			return null;
		}
	}

	public static void  create() {
		new Bar<T>();
	}

< expected:

	private static class Bar {
		public <T> Comparable<T> comp() {
			return null;
		}
	}

	public static void  create() {
		new Bar();
	}
Comment 1 Eclipse Genie CLA 2019-07-03 18:05:09 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.