tmf: Fix simple resource leak warnings
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Tue, 13 May 2014 20:46:43 +0000 (16:46 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Thu, 19 Jun 2014 21:00:02 +0000 (17:00 -0400)
commit7b3eb8c0b559cae1b1295ae5ba29547363f9abb4
tree366d5351a59939d149df67d3a1c31d6d8f68469b
parent166eb6c4163f0f898d7f052234f3683eefd594f6
tmf: Fix simple resource leak warnings

Many warnings left in ControlFlow and Resource Views, where they
get a reference to a (closeable) analysis module, and then the
compiler expects them to close it.

Since the view don't really use the module for anything other than
getting the state system, we could provide a utility class to get
the state system from an analysis module directly, without leaking
references. Shouldn't be hard to do, but outside of the scope of
this patch.

At some point we should revisit the ITmfTrace#getAnalysisModule(s)
methods. Maybe it is not such a good idea to expose closeable objects
publicly.

Change-Id: I0633d40260d0e2d37ad9da30fc6bb34d68cd5f38
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/26486
Tested-by: Hudson CI
12 files changed:
org.eclipse.linuxtools.lttng2.control.core.tests/src/org/eclipse/linuxtools/lttng2/control/core/tests/relayd/LttngRelayd24Test.java
org.eclipse.linuxtools.lttng2.kernel.ui.swtbot.tests/src/org/eclipse/linuxtools/lttng2/kernel/ui/swtbot/tests/ImportAndReadKernelSmokeTest.java
org.eclipse.linuxtools.lttng2.ust.core.tests/src/org/eclipse/linuxtools/lttng2/ust/core/tests/trace/callstack/AbstractProviderTest.java
org.eclipse.linuxtools.tmf.analysis.xml.core.tests/src/org/eclipse/linuxtools/tmf/analysis/xml/core/tests/stateprovider/StateProviderModuleTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/analysis/AnalysisModuleHelperTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/analysis/AnalysisModuleTest.java
org.eclipse.linuxtools.tmf.core.tests/src/org/eclipse/linuxtools/tmf/core/tests/analysis/AnalysisParameterProviderTest.java
org.eclipse.linuxtools.tmf.core/src/org/eclipse/linuxtools/tmf/core/trace/TmfTrace.java
org.eclipse.linuxtools.tmf.ctf.ui.swtbot.tests/src/org/eclipse/linuxtools/tmf/ctf/ui/swtbot/tests/AbstractImportAndReadSmokeTest.java
org.eclipse.linuxtools.tmf.ctf.ui.swtbot.tests/src/org/eclipse/linuxtools/tmf/ctf/ui/swtbot/tests/ImportAndReadSmokeTest.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/handlers/DropAdapterAssistant.java
org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/internal/tmf/ui/project/wizards/tracepkg/AbstractTracePackageOperation.java
This page took 0.028379 seconds and 5 git commands to generate.