@Override public T readObject(ObjectInput input) throws IOException, ClassNotFoundException { PrivilegedExceptionAction<T> action = new PrivilegedExceptionAction<T>() { @Override public T run() throws InstantiationException, IllegalAccessException { return ExternalizableExternalizer.this.getTargetClass().newInstance(); } }; try { T object = WildFlySecurityManager.doChecked(action); object.readExternal(input); return object; } catch (PrivilegedActionException e) { throw new IOException(e.getCause()); } }
/** * Build this context factory. * * @return the context factory */ public DirContextFactory build() { assertNotBuilt(); if (providerUrl == null) { throw log.noProviderUrlSet(); } if(this.targetModule != null){ if(WildFlySecurityManager.isChecking()){ WildFlySecurityManager.doChecked(new GetModuleClassLoaderAction(this.targetModule)); } else { this.targetClassLoader = this.targetModule.getClassLoader(); } } else { if(WildFlySecurityManager.isChecking()){ WildFlySecurityManager.getClassLoaderPrivileged(this.getClass()); } else { this.targetClassLoader = this.getClass().getClassLoader(); } } built = true; return new SimpleDirContextFactory(); }
public Object processInvocation(final InterceptorContext context) throws Exception { try { return WildFlySecurityManager.doChecked(context); } catch (PrivilegedActionException e) { throw e.getException(); } } }
WildFlySecurityManager.doChecked(privilegedAction, accessControlContext);
WildFlySecurityManager.doChecked(privilegedAction, accessControlContext);
WildFlySecurityManager.doChecked(privilegedAction, accessControlContext);
WildFlySecurityManager.doChecked(privilegedAction, accessControlContext);
WildFlySecurityManager.doChecked(privilegedAction, accessControlContext);
WildFlySecurityManager.doChecked(privilegedAction, accessControlContext);
WildFlySecurityManager.doChecked(privilegedAction, accessControlContext);
WildFlySecurityManager.doChecked(privilegedAction, accessControlContext);
@Override public T readObject(ObjectInput input) throws IOException, ClassNotFoundException { PrivilegedExceptionAction<T> action = new PrivilegedExceptionAction<T>() { @Override public T run() throws InstantiationException, IllegalAccessException { return ExternalizableExternalizer.this.getTargetClass().newInstance(); } }; try { T object = WildFlySecurityManager.doChecked(action); object.readExternal(input); return object; } catch (PrivilegedActionException e) { throw new IOException(e.getCause()); } }
@Override public T readObject(ObjectInput input) throws IOException, ClassNotFoundException { PrivilegedExceptionAction<T> action = new PrivilegedExceptionAction<T>() { @Override public T run() throws InstantiationException, IllegalAccessException { return ExternalizableExternalizer.this.getTargetClass().newInstance(); } }; try { T object = WildFlySecurityManager.doChecked(action); object.readExternal(input); return object; } catch (PrivilegedActionException e) { throw new IOException(e.getCause()); } }
Introspector(org.jgroups.conf.ProtocolConfiguration config) { String name = config.getProtocolName(); try { this.protocolClass = config.getClassLoader().loadClass(name).asSubclass(Protocol.class); PrivilegedAction<Void> action = () -> { Class<?> targetClass = Introspector.this.protocolClass; while (Protocol.class.isAssignableFrom(targetClass)) { for (Method method: targetClass.getDeclaredMethods()) { if (method.isAnnotationPresent(Property.class)) { String property = method.getAnnotation(Property.class).name(); if (!property.isEmpty()) { Introspector.this.properties.add(property); } } } for (Field field: targetClass.getDeclaredFields()) { if (field.isAnnotationPresent(Property.class)) { String property = field.getAnnotation(Property.class).name(); Introspector.this.properties.add(!property.isEmpty() ? property : field.getName()); } } targetClass = targetClass.getSuperclass(); } return null; }; WildFlySecurityManager.doChecked(action); } catch (ClassNotFoundException e) { throw new IllegalArgumentException(e); } }
PrivilegedExceptionAction<TP> action = transportClass::newInstance; try { stack.addAll(createProtocols(this.configuration, WildFlySecurityManager.doChecked(action).isMulticastCapable())); } catch (PrivilegedActionException e) { throw new IllegalStateException(e.getCause());
/** * Build this context factory. * * @return the context factory */ public DirContextFactory build() { assertNotBuilt(); if (providerUrl == null) { throw log.noProviderUrlSet(); } if(this.targetModule != null){ if(WildFlySecurityManager.isChecking()){ WildFlySecurityManager.doChecked(new GetModuleClassLoaderAction(this.targetModule)); } else { this.targetClassLoader = this.targetModule.getClassLoader(); } } else { if(WildFlySecurityManager.isChecking()){ WildFlySecurityManager.getClassLoaderPrivileged(this.getClass()); } else { this.targetClassLoader = this.getClass().getClassLoader(); } } built = true; return new SimpleDirContextFactory(); }
/** * Build this context factory. * * @return the context factory */ public DirContextFactory build() { assertNotBuilt(); if (providerUrl == null) { throw log.noProviderUrlSet(); } if(this.targetModule != null){ if(WildFlySecurityManager.isChecking()){ WildFlySecurityManager.doChecked(new GetModuleClassLoaderAction(this.targetModule)); } else { this.targetClassLoader = this.targetModule.getClassLoader(); } } else { if(WildFlySecurityManager.isChecking()){ WildFlySecurityManager.getClassLoaderPrivileged(this.getClass()); } else { this.targetClassLoader = this.getClass().getClassLoader(); } } built = true; return new SimpleDirContextFactory(); }
final JChannel channel = WildFlySecurityManager.doChecked(action); ProtocolStack stack = channel.getProtocolStack();