Skip to content

Commit cfb498e

Browse files
committed
Bug 38139258 - [38041090->25.09] Failed to restart services: java.lang.SecurityException due to Subject is not inherited from the parent thread
[git-p4: depot-paths = "//dev/coherence-ce/main/": change = 117324]
1 parent 6ff364a commit cfb498e

File tree

1 file changed

+7
-4
lines changed
  • prj/coherence-core/src/main/java/com/tangosol/util

1 file changed

+7
-4
lines changed

prj/coherence-core/src/main/java/com/tangosol/util/Unsafe.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import com.oracle.coherence.common.base.Logger;
1212
import com.tangosol.coherence.config.Config;
1313

14+
import com.tangosol.net.security.SecurityHelper;
1415
import com.tangosol.net.security.SecurityManagerWrapperImpl;
1516

1617
import java.security.CodeSource;
@@ -96,10 +97,12 @@ public static Unsafe getUnsafe()
9697

9798
}
9899

99-
CodeSource srcUnsafe = Unsafe.class.getProtectionDomain().getCodeSource();
100-
CodeSource srcCaller = clzCaller.getProtectionDomain().getCodeSource();
101-
CodeSource srcSecurity = SecurityManagerWrapperImpl.class.getProtectionDomain().getCodeSource();
102-
if (Base.equals(srcCaller, srcUnsafe) || Base.equals(srcCaller, srcSecurity))
100+
CodeSource srcUnsafe = Unsafe.class.getProtectionDomain().getCodeSource();
101+
CodeSource srcCaller = clzCaller.getProtectionDomain().getCodeSource();
102+
CodeSource srcSecurity = SecurityHelper.class.getProtectionDomain().getCodeSource();
103+
CodeSource srcSecurity2 = SecurityManagerWrapperImpl.class.getProtectionDomain().getCodeSource();
104+
if (Base.equals(srcCaller, srcUnsafe) || Base.equals(srcCaller, srcSecurity)
105+
|| Base.equals(srcCaller, srcSecurity2))
103106
{
104107
return INSTANCE;
105108
}

0 commit comments

Comments
 (0)