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
[WIP] Fix leaking file handlers #168
[WIP] Fix leaking file handlers #168
Conversation
# Conflicts: # pom.xml # src/main/javassist/ByteArrayClassPath.java # src/main/javassist/ClassClassPath.java # src/main/javassist/ClassPoolTail.java # src/main/javassist/LoaderClassPath.java # src/main/javassist/URLClassPath.java
Yes Unit tests All subsequent patches have been submitted based on the nickl-/javassist:junit-migrate branch as per #157 with PRs noting that they are dependent on #157 In addition to properly cleaning test resources and allowing test isolation it cleans up some warnings and includes hamcrest or complete JUnit4 freedom as per from this commit nickl-/javassist@4952c80
Hmmm yes dodgy!!! Personally I prefer returning nulls but perhaps that is not everyone's choice... but it should be either or I agree with you.
The current tests only seemed to test for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review:
I see a lot of this patch is now blemished with fixes in order to be able to run tests which is counter productive. We should get #157 applied as a matter of urgency.
src/test/Readme.txt
Outdated
|
||
> mvn test | ||
> mvn surefire:test | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh was there a Readme for tests... I don't like this!
You shouldn't have to look for documentation to be able to run tests they should simply work by running:
mvn test
Ahh sweet #157 has been applied whoop whoop!!!! I suggest apply the |
Question about the title? Please clarify what is meant by the use of "Windows" in the title. |
Sorry, bad title. The effect is only felt on Windows, but the leak is happening on all platforms. |
Thought so... I could also pick it up on macOS... eventually. Did you come right with the tests now from fresh HEAD? |
Yes, the latest master have been merged. A couple of questions:
|
Also, with
I'm not 100% if this indicate a bug in the new implementation of the benchmark is wrong somehow? |
testJIRA150 is a performance test written long time ago. |
Closes #165
Note: This PR is still work in progress.
This PR removes the
close
method fromClassPath
as it is largely not needed. The only place where it was neededJarClassPath
now handles it internally.The implementation of
JarClassPath
is taken from: #165 (comment)TODO:
ClassPath.openClassFile()
has a weird contract. It both states thatnull
can be returned if no class is found, but it can also throwNotFoundException
. It is unclear when one is chosen over the other or if it is even the correct behaviour?