Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Not A Bug
-
Affects Version/s: 2.0.0alpha
-
Fix Version/s: 2.0.0m1
-
Component/s: Compiler Integration
-
Labels:None
-
Number of attachments :
Description
Reported by Russel on the list:
I have a method definition:
@Override public Object invokeMethod ( final Class sender , final Object receiver , final String methodName , final Object[] arguments, final boolean isCallToSuper, final boolean fromInsideClass ) {
in the definition of "class GantMetaClass extends DelegatingMetaClass".
I get a warning that Class should be parameterized – which is fine per
se, but . . . if I replace it with Class<?> I then get the error:
Multiple markers at this line
- Name clash: The method invokeMethod(Class<?>, Object, String, Object[], boolean, boolean) of type GantMetaClass has the same erasure as invokeMethod
(Class, Object, String, Object[], boolean, boolean) of type DelegatingMetaClass but does not override it - The method invokeMethod(Class<?>, Object, String, Object[], boolean, boolean) of type GantMetaClass must override a superclass method
- Class is a raw type. References to generic type Class<T> should be parameterized
The last line seems to be adding insult to injury! However, if I clean
the project and rebuild it goes away so that is at least truthful
I
guess the error here is that the old error is being kept when it should
be removed. I have no idea if this is a GrEclipse or general JDT issue.
Removing the <?> causes similar behaviour, the red margin marker is
changed to yellow but the correct error message is added on top of the
existing one rather than replacing it, i.e. I get:
Multiple markers at this line
- Class is a raw type. References to generic type Class<T> should be parameterized
- overrides groovy.lang.DelegatingMetaClass.invokeMethod
- The method invokeMethod(Class<?>, Object, String, Object[], boolean, boolean) of type GantMetaClass must override a superclass method
- Name clash: The method invokeMethod(Class<?>, Object, String, Object[], boolean, boolean) of type GantMetaClass has the same erasure as invokeMethod
(Class, Object, String, Object[], boolean, boolean) of type DelegatingMetaClass but does not override it
Issue Links
- relates to
-
GRECLIPSE-455
Class and Class<?> not the same for overloading purposes
-
-
GROOVY-3829
CLONE -Class and Class<?> not the same for overloading purposes
-
These are all JDT working as designed.