Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.infinispan.client.hotrod.event;
 
 
SecurityActions for the org.infinispan.client.hotrod.event package. Do not move. Do not change class and method visibility to avoid being called from other java.security.CodeSources, thus granting privilege escalation to external code.

Author(s):
Galder ZamarreƱo
Since:
7.0
final class SecurityActions {
   private static final Log log = LogFactory.getLog(SecurityActions.class);
   static void setAccessible(final Method m) {
      try {
         if (System.getSecurityManager() != null) {
            AccessController.doPrivileged(new PrivilegedAction<Void>() {
               @Override
               public Void run() {
                  m.setAccessible(true);
                  return null;
               }
            });
         } else {
            m.setAccessible(true);
         }
      } catch (Exception e) {
         .unableToSetAccesible(me);
      }
   }
New to GrepCode? Check out our FAQ X