diff -r 2901c7b5339e -r f14c693a0e48 src/share/classes/com/sun/tools/javac/jvm/JNIWriter.java --- a/src/share/classes/com/sun/tools/javac/jvm/JNIWriter.java Tue Nov 13 15:09:15 2012 -0800 +++ b/src/share/classes/com/sun/tools/javac/jvm/JNIWriter.java Wed Nov 14 10:07:38 2012 -0800 @@ -157,13 +157,20 @@ if (c.isLocal() || (c.flags() & Flags.SYNTHETIC) != 0) return false; + /* temporary code for backwards compatibility */ for (Attribute.Compound a: c.annotations.getAttributes()) { - if (a.type.tsym == syms.nativeHeaderType.tsym) + if (a.type.tsym == syms.nativeHeaderType_old.tsym) return true; } + /* end of temporary code for backwards compatibility */ + for (Scope.Entry i = c.members_field.elems; i != null; i = i.sibling) { if (i.sym.kind == Kinds.MTH && (i.sym.flags() & Flags.NATIVE) != 0) return true; + for (Attribute.Compound a: i.sym.annotations.getAttributes()) { + if (a.type.tsym == syms.nativeHeaderType.tsym) + return true; + } } if (checkNestedClasses) { for (Scope.Entry i = c.members_field.elems; i != null; i = i.sibling) {