Bug 79267 - [search] Refactoring of static generic member fails partially
Summary: [search] Refactoring of static generic member fails partially
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M4   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-23 06:13 EST by Victor Toni CLA
Modified: 2004-12-14 11:53 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Toni CLA 2004-11-23 06:13:48 EST
I have a small snippet with two member variables.
Changing the first member ("BEFORE" -> "AFTER")is no problem, however the second
one fails ("objectToPrimitiveMap" -> "OBJECT_TO_PRIMITIVE_MAP"):

import java.lang.reflect.Type;

import java.util.HashMap;
import java.util.Map;

public class TestStaticMemeber {
	private static final Map<String, String> BEFORE	= new HashMap<String, String>(4);

	static {
		BEFORE.put("key1","value1");
		BEFORE.put("key2","value2");
	}
	
	private static final Map<Class, Type>	objectToPrimitiveMap	= new HashMap<Class,
Type>(8);

	static {
		objectToPrimitiveMap.put(Boolean.class, Boolean.TYPE);
		objectToPrimitiveMap.put(Byte.class, Byte.TYPE);
		objectToPrimitiveMap.put(Character.class, Character.TYPE);
		objectToPrimitiveMap.put(Double.class, Double.TYPE);
		objectToPrimitiveMap.put(Float.class, Float.TYPE);
		objectToPrimitiveMap.put(Integer.class, Integer.TYPE);
		objectToPrimitiveMap.put(Long.class, Long.TYPE);
		objectToPrimitiveMap.put(Short.class, Short.TYPE);
	}

}
Comment 1 Frederic Fusier CLA 2004-11-24 06:14:54 EST
Fixed.

Search engine correctly founds now reference to second static field. Problem
came from the fact that one of the type arguments used for this field
parameterized type  declaration was a raw type...

[jdt-core-internal]
Test case added: JavaSearchTests#testFieldReferenceBug79267()
Comment 2 Olivier Thomann CLA 2004-12-14 11:53:20 EST
Verified in 200412140800