Bug 105756

Summary: [1.5][model] Incorrect warning on using raw types
Product: [Eclipse Project] JDT Reporter: Stefan Schulz <schulz>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: bmiller
Version: 3.1   
Target Milestone: 3.1.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Stefan Schulz CLA 2005-08-01 23:32:09 EDT
The following example might be semantically useless, but show the problem.
Say we have the following custom class:

public class Generic<T> {
	public int size() {
		return 0;
	}
}

And a testing class:

public class Test {
	public void testList(ArrayList aList) {
		aList.size();
	}
	public void testGeneric(Generic aGeneric) {
		aGeneric.size();
	}
}

Now, eclipse shows a warning for "aGeneric.size()" but none for "aList.size()".
In fact, it shouldn't show any warning for either case. 

Taken from a discussion with Bruce Chapman: "the difference between the two that
is causing Eclipse to behave differently might be that with Generic, it has the
source code, whereas for ArrayList it will be compiling against the bytecode
from the system jar file."
Comment 1 Philipe Mulet CLA 2005-10-14 08:46:55 EDT
I am not seeing any warning being produced. Which build are you using ?
Comment 2 Philipe Mulet CLA 2005-10-14 08:48:47 EDT
Spoke to fast. Problem arises as soon as the types are in separate files.
Comment 3 Philipe Mulet CLA 2005-10-14 08:58:50 EDT
And problem only shows up when reconciling editors; not when building.
Comment 4 Jerome Lanneluc CLA 2005-10-17 07:49:40 EDT
Changed SourceTypeConverter#convert(SourceMethod, ...) to not create an empty
array if no parameters or no exception.

Added regression test ReconcilerTests#testRawUsage().

Released in both HEAD and R3_1_maintenance branch.
Comment 5 Jerome Lanneluc CLA 2005-10-17 08:46:31 EDT
Fixed
Comment 6 Maxime Daniel CLA 2006-01-10 04:37:26 EST
Verified for 3.1.2 using build M20060109-1200.
Comment 7 Frederic Fusier CLA 2006-01-10 05:04:42 EST
Verified for 3.1.2 using build M20060109-1200 (maxime)
Comment 8 Maxime Daniel CLA 2006-01-10 10:21:31 EST
Verified for 3.2 M4 using build I20051215-1506.