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 4883668d0a..76668f7822 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 @@ -504,9 +504,10 @@ public class ClassTypeResolver extends JavaParserVisitorAdapter { // swallow } catch (final LinkageError e) { if (LOG.isLoggable(Level.WARNING)) { - LOG.log(Level.WARNING, "Error during type resolution due to: " + e); + String message = "Error during type resolution of field '" + fieldImage + "' in " + + typeToSearch.getType() + " due to: " + e; + LOG.log(Level.WARNING, message); } - // TODO : report a missing class once we start doing that... return null; }