[libbluray-devel] Ixc: add doPrivileged to method resolving
hpi1
git at videolan.org
Mon Mar 23 11:51:45 CET 2015
libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Mar 23 12:48:25 2015 +0200| [6dd795f663b1d93421ee4bf0151adaabff75a037] | committer: hpi1
Ixc: add doPrivileged to method resolving
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=6dd795f663b1d93421ee4bf0151adaabff75a037
---
.../bdj/java/org/videolan/IxcRegistryImpl.java | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/src/libbluray/bdj/java/org/videolan/IxcRegistryImpl.java b/src/libbluray/bdj/java/org/videolan/IxcRegistryImpl.java
index 625fd89..a9fe28d 100644
--- a/src/libbluray/bdj/java/org/videolan/IxcRegistryImpl.java
+++ b/src/libbluray/bdj/java/org/videolan/IxcRegistryImpl.java
@@ -30,6 +30,9 @@ import java.rmi.NotBoundException;
import java.rmi.AlreadyBoundException;
import java.rmi.Remote;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
@@ -267,7 +270,7 @@ public class IxcRegistryImpl {
boolean finished = false;
Object retInCaller = null;
- public RemoteMethod(Method method, BDJXletContext context, Object[] args)
+ public RemoteMethod(final Method method, BDJXletContext context, Object[] args)
throws RemoteException {
callerContext = BDJXletContext.getCurrentContext();
@@ -278,7 +281,15 @@ public class IxcRegistryImpl {
logger.error("callee context is null");
}
calleeContext = context;
- methodInCallee = findMethodInCallee(method);
+
+ //methodInCallee = findMethodInCallee(method);
+ methodInCallee = (Method)AccessController.doPrivileged(
+ new PrivilegedAction() {
+ public Object run() {
+ return findMethodInCallee(method);
+ }
+ });
+
if (null != args) {
argsInCallee = new Object[args.length];
for (int i = 0; i < args.length; i++) {
More information about the libbluray-devel
mailing list