[java] PMD crashes with java.lang.ClassFormatError: Absent Code

attribute in method that is not native or abstract in class file
javax/xml/ws/Service

Fixes #1330
This commit is contained in:
Andreas Dangel
2018-10-06 11:17:45 +02:00
parent c48ed19397
commit 17b651190e
2 changed files with 5 additions and 1 deletions

View File

@ -166,6 +166,7 @@ public final class JavaTypeQualifiedName extends JavaQualifiedName {
* Gets the Class instance identified by this qualified name.
*
* @return A class instance, or null if the classloader threw a {@link ClassNotFoundException}
* or {@link LinkageError} while trying to load the class.
*/
public Class<?> getType() {
synchronized (this) {
@ -173,8 +174,9 @@ public final class JavaTypeQualifiedName extends JavaQualifiedName {
typeLoaded = true;
try {
representedType = loadType();
} catch (ClassNotFoundException e) {
} catch (ClassNotFoundException | LinkageError e) {
representedType = null;
//TODO: report missing/broken type in auxclasspath
}
}
return representedType;