diff --git a/docs/pages/release_notes.md b/docs/pages/release_notes.md index 9b7c7671ed..7b65f09bea 100644 --- a/docs/pages/release_notes.md +++ b/docs/pages/release_notes.md @@ -49,9 +49,11 @@ at . * [#782](https://github.com/pmd/pmd/issues/782): \[doc] Wrong information in the Release Notes about the Security ruleset * [#794](https://github.com/pmd/pmd/issues/794): \[doc] Broken documentation links for 6.0.0 * java - * [#783](https://github.com/pmd/pmd/issues/783): \[java] GuardLogStatement regression * [#793](https://github.com/pmd/pmd/issues/793): \[java] Parser error with private method in nested classes in interfaces * [#812](https://github.com/pmd/pmd/issues/812): \[java] Exception applying rule DataClass + * [#814](https://github.com/pmd/pmd/issues/814): \[java] UnsupportedClassVersionError is failure instead of a warning +* java-bestpractices + * [#783](https://github.com/pmd/pmd/issues/783): \[java] GuardLogStatement regression * [#800](https://github.com/pmd/pmd/issues/800): \[java] ForLoopCanBeForeach NPE when looping on `this` object * java-design * [#785](https://github.com/pmd/pmd/issues/785): \[java] NPE in DataClass rule diff --git a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java index 7c357aaaf8..963940043b 100644 --- a/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java +++ b/pmd-java/src/main/java/net/sourceforge/pmd/lang/java/typeresolution/ClassTypeResolver.java @@ -572,7 +572,10 @@ public class ClassTypeResolver extends JavaParserVisitorAdapter { } } catch (final NoSuchFieldException ignored) { // swallow - } catch (final NoClassDefFoundError e) { + } catch (final LinkageError e) { + if (LOG.isLoggable(Level.WARNING)) { + LOG.log(Level.WARNING, "Error during type resolution due to: " + e); + } // TODO : report a missing class once we start doing that... return null; }