< prev index next >

src/share/classes/com/sun/tools/javac/jvm/ClassReader.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1999, 2014, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -1777,19 +1777,21 @@
                 failure = ex;
             }
             // The method wasn't found: emit a warning and recover
             JavaFileObject prevSource = log.useSource(requestingOwner.classfile);
             try {
+                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
+                                    failure.getDetailValue()); //diagnostic, if present
+                    }
                 }
             } finally {
                 log.useSource(prevSource);
             }
             // Construct a new method type and symbol.  Use bottom
< prev index next >