-
Notifications
You must be signed in to change notification settings - Fork 50
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
Don't close a ZipEntryStorage archive file when obtaining its name #486
Conversation
@SuppressWarnings("resource") // Don't close the archive to not break subsequent usages | ||
String zipFileName = storage.getArchive().getName(); | ||
IPath path = IPath.fromOSString(zipFileName); |
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.
With the new API introduce in eclipse-platform/eclipse.platform#1545, this could avoid the call to getArchive()
and would avoid suppressing the warning.
Therefore I suggest we await that.
e69fb5d
to
0810494
Compare
eclipse-platform/eclipse.platform#1545 is now submitted and available after the next I-build. @iloveeclipse or @akurtakov can you please have a look at this? |
0810494
to
92ae4e0
Compare
i guess org.eclipse.debug.internal.ui.sourcelookup.SourceElementWorkbenchAdapter.getLabel(Object) needs also be updated |
forget that comment. it already is. |
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.
lgtm. just need to wait for a build
probably you need to increase the required bundle version |
Revert "Bug 558863 - Possible Recource leak warning in SourceElementQualifierProvider" This reverts commit 876dd12. Fixes eclipse-platform/eclipse.platform.ui#2251
92ae4e0
to
f89dcb7
Compare
Thank you.
The error was on my side. Since I did the change before the bundle was actually available in the TP and just rebased this after the I-build I didn't get an error because I forgot the braces. It should be fine now. |
thanks for the fix. |
What it does
Don't close a
ZipEntryStorage
archive file when obtaining its name to show a label.The setup where this happens not not very simple and I therefore didn't replicated this in a clean debug environment yet, but from looking at all callers of
ZipEntryStorage.getArchive()
, this seems to be the only one closing it.So this is just an anticipated fix that hopefully fixes eclipse-platform/eclipse.platform.ui#2251
Of course it could also be some code that is holding a reference to the archive from before it was passed to a
ZipEntryStorage
.This basically reverts 876dd12 done for Bug 558863
How to test
The setup where this happens not not very simple and I was not yet able to replicate and test this.
Author checklist