[libbluray-devel] BDJThreadGroup: security improvements
hpi1
git at videolan.org
Sun Nov 1 18:33:07 CET 2015
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Fri Oct 30 17:14:39 2015 +0200| [11e3f54f6ae5fc73b9a62c86931a8c12bcc30be5] | committer: hpi1
BDJThreadGroup: security improvements
- make Xlet context final
- make class package private
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=11e3f54f6ae5fc73b9a62c86931a8c12bcc30be5
---
.../bdj/java/org/videolan/BDJThreadGroup.java | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/src/libbluray/bdj/java/org/videolan/BDJThreadGroup.java b/src/libbluray/bdj/java/org/videolan/BDJThreadGroup.java
index f4bc1dc..4943a7e 100644
--- a/src/libbluray/bdj/java/org/videolan/BDJThreadGroup.java
+++ b/src/libbluray/bdj/java/org/videolan/BDJThreadGroup.java
@@ -20,9 +20,9 @@
package org.videolan;
-public class BDJThreadGroup extends ThreadGroup {
+class BDJThreadGroup extends ThreadGroup {
- public BDJThreadGroup(String name, BDJXletContext context) {
+ protected BDJThreadGroup(String name, BDJXletContext context) {
super(name);
this.context = context;
}
@@ -45,15 +45,11 @@ public class BDJThreadGroup extends ThreadGroup {
}
}
- public BDJXletContext getContext() {
+ protected BDJXletContext getContext() {
return context;
}
- public void setContext(BDJXletContext context) {
- this.context = context;
- }
-
- public boolean waitForShutdown(int timeout, int maxThreads) {
+ protected boolean waitForShutdown(int timeout, int maxThreads) {
if (parentOf(Thread.currentThread().getThreadGroup()) && maxThreads < 1) {
logger.error("Current Thread is contained within ThreadGroup to be disposed.");
@@ -94,8 +90,6 @@ public class BDJThreadGroup extends ThreadGroup {
} catch (IllegalThreadStateException e) {
logger.error("ThreadGroup destroy failed: " + e);
}
-
- context = null;
}
public void dumpThreads() {
@@ -115,6 +109,6 @@ public class BDJThreadGroup extends ThreadGroup {
}
}
- private BDJXletContext context;
+ private final BDJXletContext context;
private static final Logger logger = Logger.getLogger(BDJThreadGroup.class.getName());
}
More information about the libbluray-devel
mailing list