com.arjuna.webservices11.util.PrivilegedMapBuilderFactory Maven / Gradle / Ivy
/*
Copyright The Narayana Authors
SPDX-License-Identifier: Apache-2.0
*/
package com.arjuna.webservices11.util;
import org.jboss.ws.api.addressing.MAPBuilder;
import java.security.AccessController;
/**
* @author Gytis Trikleris
*/
public class PrivilegedMapBuilderFactory {
private static final PrivilegedMapBuilderFactory INSTANCE = new PrivilegedMapBuilderFactory();
private PrivilegedMapBuilderFactory() {
}
public static PrivilegedMapBuilderFactory getInstance() {
return INSTANCE;
}
public MAPBuilder getBuilderInstance() {
final MapBuilderAction mapBuilderAction = MapBuilderAction.getInstance();
if (System.getSecurityManager() == null) {
return mapBuilderAction.run();
}
return AccessController.doPrivileged(mapBuilderAction);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy