Wilcard bound inside .class file

1 view
Skip to first unread message

Olivier

unread,
Nov 19, 2009, 2:17:54 PM11/19/09
to Type annotations (JSR 308) discussions
Hi,

Using the version 1.0.2 of the javac and javap tools, I don't get
attribute for the type use used on a wildcard bound. For example:

import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import java.lang.annotation.Retention;
import static java.lang.annotation.RetentionPolicy.*;
import java.util.List;

@Target(TYPE_USE)
@Retention(RUNTIME)
@interface A {}

class Z {}

public class X {
List<? extends @A Z> lst;
}

leads to no RuntimeVisibleTypeAttribute attribute for the field info.
Did I miss something or an special command line argument ?

Thanks,

Olivier

Mahmood Ali

unread,
Nov 19, 2009, 4:43:41 PM11/19/09
to jsr308-...@googlegroups.com
Greetings,

Thanks for reporting the bug. Apparently, I wasn't handling wildcards
properly. I just checked in a fix along with a test.

Please update your repository (if you are using
code.google.com/p/jsr308-langtools), or download the latest javac.jar
from http://primitive.blogdns.org:8080/job/jsr308-langtools/lastStableBuild/artifact/dist/lib/javac.jar
(browse through the folder to download the rest).

Thanks again.
Regards,
Mahmood
Reply all
Reply to author
Forward
0 new messages