Skip to content

[java] Improve how we deal with broken classes#1133

Merged
adangel merged 3 commits into
pmd:masterfrom
jsotuyod:issue-1131
May 27, 2018
Merged

[java] Improve how we deal with broken classes#1133
adangel merged 3 commits into
pmd:masterfrom
jsotuyod:issue-1131

Conversation

@jsotuyod

@jsotuyod jsotuyod commented May 22, 2018

Copy link
Copy Markdown
Member

@jsotuyod jsotuyod added this to the 6.4.0 milestone May 22, 2018
@adangel adangel changed the title [java] improve how we deal with broken classes [java] Improve how we deal with broken classes May 23, 2018

@adangel adangel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change makes sense to me.
I had a look, where else we catch "ClassNotFoundException":

@@ -1246,6 +1251,13 @@ private void populateType(TypeNode node, String className, int arrayDimens) {
myType = pmdClassLoader.loadClass(qualifiedNameInner);
} catch (Exception ignored) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probable catch here just "ClassNotFoundException", too - at least, to make it consistent...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

possibly, yeah!

@jsotuyod

Copy link
Copy Markdown
Member Author

I did the change to TypeHelper on a different branch (working on #1115), I'll add it to this PR if that makes sense.

@jsotuyod

Copy link
Copy Markdown
Member Author

@adangel there you go! thanks!

@adangel adangel self-assigned this May 27, 2018
@adangel adangel merged commit 61677e6 into pmd:master May 27, 2018
@jsotuyod jsotuyod deleted the issue-1131 branch May 27, 2018 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

2 participants