Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Waibel2016-05-31 11:29:01 -0400
committerFlorian Waibel2016-05-31 11:29:01 -0400
commite1d3d0720ed6543ef14c1f47a23a6a392e85d5cf (patch)
treec9251afd1c56fd548a5c46770768c4e4c6438d53
parenta746d53d98b7dda758ec2afe9ac7fd2afd3e6c50 (diff)
downloadorg.eclipse.virgo.kernel-e1d3d0720ed6543ef14c1f47a23a6a392e85d5cf.tar.gz
org.eclipse.virgo.kernel-e1d3d0720ed6543ef14c1f47a23a6a392e85d5cf.tar.xz
org.eclipse.virgo.kernel-e1d3d0720ed6543ef14c1f47a23a6a392e85d5cf.zip
Small refactoring to avoid resource leak warning
-rw-r--r--org.eclipse.virgo.kernel.deployer.dm/src/main/java/org/eclipse/virgo/kernel/deployer/app/spring/UserRegionModuleContextAccessor.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/org.eclipse.virgo.kernel.deployer.dm/src/main/java/org/eclipse/virgo/kernel/deployer/app/spring/UserRegionModuleContextAccessor.java b/org.eclipse.virgo.kernel.deployer.dm/src/main/java/org/eclipse/virgo/kernel/deployer/app/spring/UserRegionModuleContextAccessor.java
index a9ba0abc..4109aaec 100644
--- a/org.eclipse.virgo.kernel.deployer.dm/src/main/java/org/eclipse/virgo/kernel/deployer/app/spring/UserRegionModuleContextAccessor.java
+++ b/org.eclipse.virgo.kernel.deployer.dm/src/main/java/org/eclipse/virgo/kernel/deployer/app/spring/UserRegionModuleContextAccessor.java
@@ -62,9 +62,8 @@ final class UserRegionModuleContextAccessor implements ModuleContextAccessor {
if (service instanceof ApplicationContext) {
ApplicationContext appCtx = (ApplicationContext) service;
if (appCtx instanceof ConfigurableOsgiBundleApplicationContext) {
- ConfigurableOsgiBundleApplicationContext cAppCtx = (ConfigurableOsgiBundleApplicationContext) appCtx;
- if (bundleContext == cAppCtx.getBundleContext()) {
- return new ModuleContextWrapper(cAppCtx);
+ if (bundleContext == ((ConfigurableOsgiBundleApplicationContext) appCtx).getBundleContext()) {
+ return new ModuleContextWrapper((ConfigurableOsgiBundleApplicationContext) appCtx);
}
}
}

Back to the top