Java Code Examples for java.security.Permission#toString()

The following examples show how to use java.security.Permission#toString() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Activation.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private static void checkPermission(PermissionCollection perms,
                                    Permission p)
    throws AccessControlException
{
    if (!perms.implies(p)) {
        throw new AccessControlException(
           "access denied " + p.toString());
    }
}
 
Example 2
Source File: DcmdMBeanPermissionsTest.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
public final void checkPermission(final Permission perm) {
    for (Permission p : grantedPermissions) {
        if (p.implies(perm)) {
            return;
        }
    }
    throw new SecurityException(perm.toString());
}
 
Example 3
Source File: Activation.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
private static void checkPermission(PermissionCollection perms,
                                    Permission p)
    throws AccessControlException
{
    if (!perms.implies(p)) {
        throw new AccessControlException(
           "access denied " + p.toString());
    }
}
 
Example 4
Source File: DcmdMBeanPermissionsTest.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public final void checkPermission(final Permission perm) {
    for (Permission p : grantedPermissions) {
        if (p.implies(perm)) {
            return;
        }
    }
    throw new SecurityException(perm.toString());
}
 
Example 5
Source File: Activation.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private static void checkPermission(PermissionCollection perms,
                                    Permission p)
    throws AccessControlException
{
    if (!perms.implies(p)) {
        throw new AccessControlException(
           "access denied " + p.toString());
    }
}
 
Example 6
Source File: DcmdMBeanPermissionsTest.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
public final void checkPermission(final Permission perm) {
    for (Permission p : grantedPermissions) {
        if (p.implies(perm)) {
            return;
        }
    }
    throw new SecurityException(perm.toString());
}
 
Example 7
Source File: Activation.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
private static void checkPermission(PermissionCollection perms,
                                    Permission p)
    throws AccessControlException
{
    if (!perms.implies(p)) {
        throw new AccessControlException(
           "access denied " + p.toString());
    }
}
 
Example 8
Source File: DcmdMBeanPermissionsTest.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
public final void checkPermission(final Permission perm) {
    for (Permission p : grantedPermissions) {
        if (p.implies(perm)) {
            return;
        }
    }
    throw new SecurityException(perm.toString());
}
 
Example 9
Source File: Activation.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private static void checkPermission(PermissionCollection perms,
                                    Permission p)
    throws AccessControlException
{
    if (!perms.implies(p)) {
        throw new AccessControlException(
           "access denied " + p.toString());
    }
}
 
Example 10
Source File: Activation.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
private static void checkPermission(PermissionCollection perms,
                                    Permission p)
    throws AccessControlException
{
    if (!perms.implies(p)) {
        throw new AccessControlException(
           "access denied " + p.toString());
    }
}
 
Example 11
Source File: Activation.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
private static void checkPermission(PermissionCollection perms,
                                    Permission p)
    throws AccessControlException
{
    if (!perms.implies(p)) {
        throw new AccessControlException(
           "access denied " + p.toString());
    }
}
 
Example 12
Source File: DcmdMBeanPermissionsTest.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
public final void checkPermission(final Permission perm) {
    for (Permission p : grantedPermissions) {
        if (p.implies(perm)) {
            return;
        }
    }
    throw new SecurityException(perm.toString());
}
 
Example 13
Source File: Activation.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private static void checkPermission(PermissionCollection perms,
                                    Permission p)
    throws AccessControlException
{
    if (!perms.implies(p)) {
        throw new AccessControlException(
           "access denied " + p.toString());
    }
}
 
Example 14
Source File: DcmdMBeanPermissionsTest.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
public final void checkPermission(final Permission perm) {
    for (Permission p : grantedPermissions) {
        if (p.implies(perm)) {
            return;
        }
    }
    throw new SecurityException(perm.toString());
}
 
Example 15
Source File: Activation.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private static void checkPermission(PermissionCollection perms,
                                    Permission p)
    throws AccessControlException
{
    if (!perms.implies(p)) {
        throw new AccessControlException(
           "access denied " + p.toString());
    }
}
 
Example 16
Source File: Test.java    From native-obfuscator with GNU General Public License v3.0 5 votes vote down vote up
public void checkPermission (Permission perm) {
    try{
        perm.toString(); 
    }
    catch (Exception e) {
        System.out.println("Unexpected exception was thrown:");
        e.printStackTrace();
    }
}
 
Example 17
Source File: DcmdMBeanPermissionsTest.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
public final void checkPermission(final Permission perm) {
    for (Permission p : grantedPermissions) {
        if (p.implies(perm)) {
            return;
        }
    }
    throw new SecurityException(perm.toString());
}
 
Example 18
Source File: Activation.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private static void checkPermission(PermissionCollection perms,
                                    Permission p)
    throws AccessControlException
{
    if (!perms.implies(p)) {
        throw new AccessControlException(
           "access denied " + p.toString());
    }
}
 
Example 19
Source File: DcmdMBeanPermissionsTest.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
public final void checkPermission(final Permission perm) {
    for (Permission p : grantedPermissions) {
        if (p.implies(perm)) {
            return;
        }
    }
    throw new SecurityException(perm.toString());
}
 
Example 20
Source File: SM2471.java    From native-obfuscator with GNU General Public License v3.0 4 votes vote down vote up
public void checkPermission(Permission perm) {
    perm.toString();
}