Bug 84944 - [1.5][builder] Parameterized return type is sometimes not visible.
Summary: [1.5][builder] Parameterized return type is sometimes not visible.
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 M6   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 85930 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-02-10 16:49 EST by Victor Toni CLA
Modified: 2005-03-31 08:50 EST (History)
1 user (show)

See Also:


Attachments
Minimal project to test. (113.03 KB, application/octet-stream)
2005-02-10 16:51 EST, Victor Toni CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Toni CLA 2005-02-10 16:49:06 EST
This is a very strange error because it is not always reproduceable.

I defined an interface with a parameterized return type:

--------------------------
package parser;

public interface ValueParser<T> {
	T parse(final String string);
}

--------------------------

However the return type seems to be not visible for some of the implementations.
The strange thing about this behavior is that a "clean project" may clean the
error until next compile, sometimes the error did not occur in the different
implementation.

I tried to create a minimal persion project which could be attached in bugzilla
but it doesn't seem to show the bug.

The error was shown in line 21 of "test/BooleanParserTest.java".
Comment 1 Victor Toni CLA 2005-02-10 16:51:39 EST
Created attachment 17837 [details]
Minimal project to test.

Maybe this test project is too small. My original project had multiple
implementations of "ValueParser<T>" but only one at a time showed the strange
behavior.
Comment 2 Frederic Fusier CLA 2005-02-16 07:12:26 EST
I cannot reproduce with 3.1 M5 candidate (I20040215-2300). Please have a try
with M5 when available (end of current week) and reopen if necessary, thanks
Comment 3 Victor Toni CLA 2005-02-16 07:34:49 EST
I will test the new release.
However this error doesn't occur *every* time. If I change something within the
file it may work, but if I make a "Clean project" the error reappears.

I guess that it might have something to do with internal representation of the
parameterized return type or the compiler itself.

More feedback after testing.
Comment 4 Frederic Fusier CLA 2005-02-16 07:40:55 EST
I've played a while with your project, modified code, rebuilt (incremental and
full) and never got the error.
If you get it again with M5 please try to provide us a scenario as precise as
possible to help us to reproduce it.
TIA
Comment 5 Victor Toni CLA 2005-02-21 14:07:17 EST
I tried the 3.1M5a build but it still happens.

I can reproduce it by cleaning all projects while it disappears if I modify the
source file and save it. Even if the modification was only a whitespace and
reverted before saving.

I tried to make a minimal project but it isn't reproduceable on a smaller scale.

I could send it to in private if you would like (it consists out of 3 (small)
projects, about 234k total already including junit and commons-logging).
Comment 6 Frederic Fusier CLA 2005-02-21 17:57:17 EST
Of course, please send it to my internet address: frederic_fusier@fr.ibm.com, thx
Comment 7 Philipe Mulet CLA 2005-02-22 19:13:56 EST
*** Bug 85930 has been marked as a duplicate of this bug. ***
Comment 8 Frederic Fusier CLA 2005-02-23 14:27:59 EST
Reproduced.

It seems that builder does not see dependence to Boolean in BooleanParserTest
and compiles it with an UnresolvedReferenceBinding...

Kent, I'll forward you Victor's mail with project to reproduce the issue...
Comment 9 Kent Johnson CLA 2005-02-25 16:46:36 EST
Added GenericType test532
Comment 10 David Audel CLA 2005-03-31 08:50:57 EST
Verified in I20050330-0500