diff -r 5c956be64b9e -r 71f35e4b93a5 src/share/classes/com/sun/tools/javac/comp/Lower.java --- a/src/share/classes/com/sun/tools/javac/comp/Lower.java Wed Jan 23 20:57:40 2013 +0000 +++ b/src/share/classes/com/sun/tools/javac/comp/Lower.java Wed Jan 23 13:27:24 2013 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -2288,7 +2288,7 @@ return tree.packageAnnotations.nonEmpty(); case NONEMPTY: for (Attribute.Compound a : - tree.packge.annotations.getAttributes()) { + tree.packge.annotations.getDeclarationAttributes()) { Attribute.RetentionPolicy p = types.getRetention(a); if (p != Attribute.RetentionPolicy.SOURCE) return true; @@ -2685,6 +2685,13 @@ result = tree; } + public void visitAnnotatedType(JCAnnotatedType tree) { + // No need to retain type annotations any longer. + // tree.annotations = translate(tree.annotations); + tree.underlyingType = translate(tree.underlyingType); + result = tree.underlyingType; + } + public void visitTypeCast(JCTypeCast tree) { tree.clazz = translate(tree.clazz); if (tree.type.isPrimitive() != tree.expr.type.isPrimitive())