Ciao Sandro,
I was wondering about the files being closed, and did some
profiling on the code... It turns out that the VFS system closes things
itself later on, so I don't think those are a (real) problem. It is
also unclear when exactly you would close the "baseFile" object.... I
guess when you close the browser, but .... Anyway, I don't think it is a
real issue. But, I will do some checking in our code (since I'm using
it a lot now). I actually think the same "errors" would be in the
regular file browsers as well (since I copied them to make the VFS
code). But, if not, then maybe there is something I missed in the
translation.
Yes, I think we should do some try-with-resources from Java 7 in
"trunk" -- I already started doing this (I think), so .... go for it!
The secondary ones .... I think whatever real cleanup of unused
variables, etc. would be great. (Would also like to add Javadoc --
which we don't have a lot of).
Thanks for checking on this.
Ciao,
~Roger
On 6/19/14 12:49 AM, Sandro Martini wrote:
Hi all,
enabling many warnings inside eclipse 4.3sr2 I see some warnings, some
of them are false positive, but for others could be good to take a
look.
Then, I'll update eclipse installation to eclipse 4.4 before the end
of the month (should be released 25 June), and see what happens
enabling many warnings there ... even to start play with an updated
JDK 8 and Pivot.
Note that some of them, like: Unnecessary @SuppressWarnings("unchecked")
are there to avoid generating warnings during ant builds ... so it
would be better to keep them.
In trunk we could even migrate some blocks to the resource management
way of Java 7, ok ?
Anyway these are some warnings:
Potential resource leak: 'baseFile' may not be closed on
VFSBrowser.java , VFSBrowserSheet.java , TerraVFSBrowserSkin.java ,
TerraVFSBrowserSheetSkin.java , etc ...
Someone tried to analyze real applications using them for example with
eclipse Memory Analyzing Tool (MAT) or other toool ? Roger, what do
you think ?
And then others (sample), secondary :
The allocated object is never used on ColorSchemeBuilderWindow.java
, FakeWindowSkin.java , TerraFrameSkin.java , etc ... I'll try to
take a look on them.
What do you think ?
Bye,
Sandro