Skip to content
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

Refactor URLClassLoaderTest.testGetPackage to testGetDefinedPackage #80

Merged
merged 1 commit into from
Jun 9, 2018

Conversation

gayanW
Copy link
Collaborator

@gayanW gayanW commented Jun 7, 2018

ClassLoader.getPackage(String) is deprecated. This refactors URLClassLoaderTest to use ClassLoader.getDefinedPackage(String) instead.

gov.nasa.jpf.test.java.net.URLClassLoaderTest.TestClassLoader is only used within gov.nasa.jpf.test.java.net.URLClassLoaderTest.
gov.nasa.jpf.test.java.net.URLClassLoaderTest.TestClassLoader#getPackage
is being removed as it is no longer being used once the test being refactored.

Fixes: #71

ClassLoader.getPackage(String) is deprecated. This refactors
URLClassLoaderTest to use ClassLoader.getDefinedPackage(String) instead.

gov.nasa.jpf.test.java.net.URLClassLoaderTest.TestClassLoader is only
used within gov.nasa.jpf.test.java.net.URLClassLoaderTest.
gov.nasa.jpf.test.java.net.URLClassLoaderTest.TestClassLoader#getPackage
is being removed as it is no longer being used once the test being
refactored.

Fixes: javapathfinder#71
@cyrille-artho
Copy link
Member

Thanks. The new test fails; can you please try to see why?

[junit] Running gov.nasa.jpf.test.java.net.URLClassLoaderTest [junit] Tests run: 20, Failures: 20, Errors: 0, Skipped: 0, Time elapsed: 0.729 sec

It would be good if at least this test succeeded; this would allow us to figure out how to load the base classes.

@gayanW
Copy link
Collaborator Author

gayanW commented Jun 8, 2018

It fails due to #53. It did fail before. However I tried remote debugging the method, executing the assertions independently, and they do pass.

I'll keep #53 and the class loading issue for later, as I think it will be good do some research prior to fixing those.

@cyrille-artho
Copy link
Member

cyrille-artho commented Jun 8, 2018 via email

@gayanW
Copy link
Collaborator Author

gayanW commented Jun 8, 2018

The stacktrace when test fails is as in issue #53. If #53 is being fixed then it will throw the classloading exception.

@cyrille-artho
Copy link
Member

I see; #53 may not be so easy to fix. I'll merge this one, and we can work on #53 later.

@cyrille-artho cyrille-artho merged commit 0fc5a7b into javapathfinder:java-10 Jun 9, 2018
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