openjdk team mailing list archive
-
openjdk team
-
Mailing list archive
-
Message #07012
[Bug 611284] Re: OpenJDK compiler 6b20pre on Maverick doesn't recognize Generics Correctly
Status changed to 'Confirmed' because the bug affects multiple users.
** Changed in: openjdk-6 (Ubuntu)
Status: New => Confirmed
--
You received this bug notification because you are a member of OpenJDK,
which is subscribed to openjdk-6 in Ubuntu.
https://bugs.launchpad.net/bugs/611284
Title:
OpenJDK compiler 6b20pre on Maverick doesn't recognize Generics
Correctly
Status in “openjdk-6” package in Ubuntu:
Confirmed
Bug description:
OpenJDK compiler can't unify custom type defined in signature by
generics.
Example:
import java.util.List;
public class GenericBug {
public <X extends String, Y extends List<X>, Z extends List<X>> Z add(X element, Y list){
list.add(element);
return list;
}
}
This code compile correctly on Sun JDK but OpenJDK compiler displays error:
"incompatible types
required: Z
found: Y"
But btw Z and Y is the same type: List<X>
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/611284/+subscriptions
References