Skip to content

Commit 7f7c03f

Browse files
committed
Fix ThreadLocal leak in startIfNecessary by delegating to start()
1 parent e5d4b94 commit 7f7c03f

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

core/src/main/java/lucee/runtime/osgi/OSGiUtil.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1471,14 +1471,15 @@ private static Bundle _startIfNecessary(Bundle bundle, Set<String> parents) thro
14711471

14721472
synchronized (SystemUtil.createToken(bundle.getSymbolicName(), bundle.getVersion().toString())) {
14731473
if (bundle.getState() != Bundle.ACTIVE) {
1474-
Bundle result = _start(bundle, parents);
1474+
Bundle result = parents == null ? start(bundle) : _start(bundle, parents);
14751475
return result;
14761476
}
14771477
return bundle;
14781478
}
14791479
}
14801480

14811481
public static Bundle start(Bundle bundle) throws BundleException {
1482+
if (bundle == null) return bundle;
14821483
try {
14831484
return _start(bundle, null);
14841485
}

loader/build.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<project default="core" basedir="." name="Lucee"
33
xmlns:resolver="antlib:org.apache.maven.resolver.ant">
44

5-
<property name="version" value="7.0.0.394-SNAPSHOT"/>
5+
<property name="version" value="7.0.0.395-SNAPSHOT"/>
66

77
<taskdef uri="antlib:org.apache.maven.resolver.ant" resource="org/apache/maven/resolver/ant/antlib.xml">
88
<classpath>

loader/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
<groupId>org.lucee</groupId>
55
<artifactId>lucee</artifactId>
6-
<version>7.0.0.394-SNAPSHOT</version>
6+
<version>7.0.0.395-SNAPSHOT</version>
77
<packaging>jar</packaging>
88

99
<name>Lucee Loader Build</name>

0 commit comments

Comments
 (0)