Bug 350093 - Erroneous name clash error in @Override methods
Summary: Erroneous name clash error in @Override methods
Status: CLOSED DUPLICATE of bug 350133
Alias: None
Product: Objectteams
Classification: Tools
Component: Releng (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 2.1 M1   Edit
Assignee: Stephan Herrmann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-22 15:16 EDT by André Lehmann CLA
Modified: 2011-08-13 12:16 EDT (History)
3 users (show)

See Also:


Attachments
Visitor.java (444 bytes, application/octet-stream)
2011-06-22 15:17 EDT, André Lehmann CLA
stephan.herrmann: iplog+
Details
Caller.java (492 bytes, application/octet-stream)
2011-06-22 15:17 EDT, André Lehmann CLA
stephan.herrmann: iplog+
Details

Note You need to log in before you can comment on or make changes to this bug.
Description André Lehmann CLA 2011-06-22 15:16:22 EDT
Build Identifier: I20110613-1736

In a hierarchy envolving a interface, a abstract class and a concrete class, with Generic declarations in interface and abstract class, the JDT compiler cause a 'Name clash erro', meanwhile javac 6 compiles fine.

Reproducible: Always

Steps to Reproduce:
1. Compile the attacheds files with JDT
2. Compile the attacheds files with Javac
3. See the difference
Comment 1 André Lehmann CLA 2011-06-22 15:17:09 EDT
Created attachment 198430 [details]
Visitor.java
Comment 2 André Lehmann CLA 2011-06-22 15:17:26 EDT
Created attachment 198431 [details]
Caller.java
Comment 3 André Lehmann CLA 2011-06-22 15:27:23 EDT
Additional comment:
They compiled very well in the previous JDT version
Comment 4 Srikanth Sankaran CLA 2011-06-22 22:02:05 EDT
I'll follow up.
Comment 5 Olivier Thomann CLA 2011-06-22 22:55:42 EDT
Using HEAD, I get:
----------
1. WARNING in C:\tests_sources\Caller.java (at line 3)
	private static class VisitorImpl extends VisitorAdapter<Object> {
	                     ^^^^^^^^^^^
The type Caller.VisitorImpl is never used locally
----------
2. WARNING in C:\tests_sources\Caller.java (at line 21)
	private void accept(Visitor<Parameter1, Parameter2> v) {
	             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The method accept(Visitor<Parameter1,Parameter2>) from the type Caller is never used locally
----------
----------
3. WARNING in C:\tests_sources\Visitor.java (at line 2)
	public interface Visitor<R, A> {
	                            ^
The type parameter A is hiding the type A
----------
4. WARNING in C:\tests_sources\Visitor.java (at line 16)
	abstract class VisitorAdapter<A> implements Visitor<Parameter1, A> {
	                              ^
The type parameter A is hiding the type A
----------
4 problems (4 warnings)
COMPILE FINISHED--------

Could you please specify the version of the bundle org.eclipse.jdt.core ?
Comment 6 Olivier Thomann CLA 2011-06-22 22:56:43 EDT
More precisely I get:
----------
1. WARNING in C:\tests_sources\Caller.java (at line 3)
	private static class VisitorImpl extends VisitorAdapter<Object> {
	                     ^^^^^^^^^^^
The type Caller.VisitorImpl is never used locally
----------
2. WARNING in C:\tests_sources\Caller.java (at line 21)
	private void accept(Visitor<Parameter1, Parameter2> v) {
	             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The method accept(Visitor<Parameter1,Parameter2>) from the type Caller is never used locally
----------

If I remove the class A that I had in the same folder.
Comment 7 André Lehmann CLA 2011-06-24 10:04:50 EDT
I use "3.7.0.v20110520-0800-7z8gFchFMTdFYKuLqBLqRja9B15B" version of "org.eclipse.jdt.feature.group".
Comment 8 Olivier Thomann CLA 2011-06-24 11:41:33 EDT
Go to Help>About Eclipse SDK>Installation Details>Plugins and please provide the bundle id for the org.eclipse.jdt.core bundle.
Thanks.
Comment 9 André Lehmann CLA 2011-06-24 12:01:41 EDT
org.eclipse.jdt.core - 3.7.0.v_OTDT_r200_201106070730
Comment 10 Olivier Thomann CLA 2011-06-24 12:06:11 EDT
Stephan, is this an issue with Object Team?
Comment 11 Stephan Herrmann CLA 2011-06-24 13:17:43 EDT
(In reply to comment #10)
> Stephan, is this an issue with Object Team?

Indeed so, I'll check what's going on here.
Comment 12 Stephan Herrmann CLA 2011-06-24 13:36:12 EDT
(In reply to comment #9)
> org.eclipse.jdt.core - 3.7.0.v_OTDT_r200_201106070730

André, it seems you (accidentally?) installed the feature
"Object Teams Patch for JDT/Core", which replaces the original jdt.core 
with a variant that is capable of compiling the Java-extension OT/J.

If this install was indeed unintended I'd like to find out how this
got included in your install.
Uninstalling the mentioned feature should then resolve the issue for
you: Help > About Eclipse SDK > Installation Details > Installed Software
Identify the feature and click Uninstall.

Additionally there seems to be a bug in Object Teams which should indeed
be fully compatible with the original jdt.core but seems not to be.
Comment 13 André Lehmann CLA 2011-06-27 15:00:47 EDT
Yes!
I installed "Object Teams Patch for JDT/Core" believing it would be some kind of fix for JDT. When I uninstalled Oracle, compile the classes again.
Sorry about bug ticket, but I thought it was an error of eclipse.
Thanks for patience ^.^
Comment 14 Stephan Herrmann CLA 2011-06-27 16:47:00 EDT
(In reply to comment #13)
> Yes!
> I installed "Object Teams Patch for JDT/Core" believing it would be some kind
> of fix for JDT.

Thanks for confirming. Do you remember whether this was proposed during
"check for updates" or else what workflow brought you to installing
this patch feature?

I'm asking, because we tried to avoid that this feature would be proposed
unless you explicitly selected "Object Teams Development Tooling"
(from the "Programming Languages" category).

> Sorry about bug ticket, but I thought it was an error of eclipse.

No reason to apologize, the ticket is helpful indeed, if not for JDT
then for the Object Teams project.
Comment 15 Stephan Herrmann CLA 2011-08-13 12:16:31 EDT
I marked IP of the attachments because these are used in test cases
for Object Teams (bug 350318).

Changing resolution of this bug as duplicate of bug 350133, 
guessing that "check for updates" might have accidentally proposed 
to install the OT patch.

*** This bug has been marked as a duplicate of bug 350133 ***