--- old/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java 2015-01-07 17:35:17.818480945 -0800 +++ new/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java 2015-01-07 17:35:17.718480945 -0800 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1999, 2015, 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 @@ -1541,15 +1541,17 @@ // The method wasn't found: emit a warning and recover JavaFileObject prevSource = log.useSource(requestingOwner.classfile); try { - if (failure == null) { - log.warning("annotation.method.not.found", - container, - name); - } else { - log.warning("annotation.method.not.found.reason", - container, - name, - failure.getDetailValue());//diagnostic, if present + if (lintClassfile) { + if (failure == null) { + log.warning("annotation.method.not.found", + container, + name); + } else { + log.warning("annotation.method.not.found.reason", + container, + name, + failure.getDetailValue()); //diagnostic, if present + } } } finally { log.useSource(prevSource);