Bug 105756 - [1.5][model] Incorrect warning on using raw types
Summary: [1.5][model] Incorrect warning on using raw types
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.2   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-01 23:32 EDT by Stefan Schulz CLA
Modified: 2006-01-10 10:21 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.