Skip to content

Fixed missing ClassNotFoundException for invalid array types due to incomplete checks in the method Types.getClassNameFromTypeName() (#204) #208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 19, 2019

Conversation

rtrimana
Copy link

  1. Added a fix for the method Types.getClassNameFromTypeName().
  2. Added a unit test to test that this fix can catch the invalid array type with a java.lang.ClassNotFoundException.

Please see this issue for further explanation about the problem.

rtrimana added 7 commits July 5, 2019 12:37
…ineClass() native method and the necessary unit test testDefineClass for this change (javapathfinder#199)
1) Changed "compile" to "testCompile".
2) Changed from "configurations.compile" to "from configurations.testCompile" in "task copyLibs".
3) Fixed indentation for "dependsOn copyLibs".
Moved the path for asm-7.1.jar from "jpf-core.classpath" to "jpf-core.test_classpath" as this is only needed for a unit test.
1) Restored the "java.lang.LinkageError" exception.
2) Added additional checks in the "SystemClassLoaderInfo" for missing classes and return the class when found.
Added an error test testDefineClassError to test the java.lang.LinkageError when a class is defined twice in the ClassLoader.
…ncomplete checks in the method Types.getClassNameFromTypeName() (javapathfinder#204)
@rtrimana
Copy link
Author

rtrimana commented Jul 17, 2019

@cyrille-artho BTW, I apologize for including the commits that you have squash-merged before in this pull request. This was because I was syncing my locally forked JPF repo with the main JPF repo. Please let me know if I need to re-fork the repository on my local, or you can actually select specific commits for this pull request.

@cyrille-artho
Copy link
Member

@rtrimana : No problem, I just wanted to document why I removed parts of the commit messages.
It is a good idea that you commented each commit. As I was squashing (combining) all commits into one, messages that refer to commits that cancel a previous edit no longer make sense, so I removed those.

@cyrille-artho
Copy link
Member

Thank you very much for your detailed explanations and the patch!

@cyrille-artho cyrille-artho merged commit 9beaa98 into javapathfinder:master Jul 19, 2019
@rtrimana
Copy link
Author

You're welcome! It's my pleasure and thanks for letting me contribute to the JPF project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants