Package java.util.logging

Examples of java.util.logging.LoggingPermission


    permissions.add(new RuntimePermission("setContextClassLoader"));
    permissions.add(new RuntimePermission("createClassLoader"));
    permissions.add(new RuntimePermission("getProtectionDomain"));
    permissions.add(new RuntimePermission("accessDeclaredMembers"));
    permissions.add(new ReflectPermission("suppressAccessChecks"));
    permissions.add(new LoggingPermission("control", ""));
    permissions.add(new RuntimePermission("getStackTrace"));
    permissions.add(new RuntimePermission("getenv.*"));
    permissions.add(new RuntimePermission("setIO"));
    permissions.add(new PropertyPermission("*", "read,write"));

View Full Code Here


    /**
     * @tests serialization/deserialization compatibility.
     */
    public void testSerializationSelf() throws Exception {
        SerializationTest.verifySelf(new LoggingPermission("control", ""));
    }
View Full Code Here

    /**
     * @tests serialization/deserialization compatibility with RI.
     */
    public void testSerializationCompatibility() throws Exception {

        SerializationTest.verifyGolden(this, new LoggingPermission("control",
                ""));
    }
View Full Code Here

                ""));
    }

  public void testLoggingPermission() {
    try {
      new LoggingPermission(null, null);
      fail("should throw IllegalArgumentException");
    } catch (NullPointerException e) {
    }
    try {
      new LoggingPermission("", null);
      fail("should throw IllegalArgumentException");
    } catch (IllegalArgumentException e) {
    }
    try {
      new LoggingPermission("bad name", null);
      fail("should throw IllegalArgumentException");
    } catch (IllegalArgumentException e) {
    }
    try {
      new LoggingPermission("Control", null);
      fail("should throw IllegalArgumentException");
    } catch (IllegalArgumentException e) {
    }
    try {
      new LoggingPermission("control",
          "bad action");
      fail("should throw IllegalArgumentException");
    } catch (IllegalArgumentException e) {
    }
   
        new LoggingPermission("control", "");
   
        new LoggingPermission("control", null);
  }
View Full Code Here

        // junit harness stuff
        permissionsGranted
                .add(new PropertyPermission("line.separator", "read"));
        permissionsGranted.add(new RuntimePermission("exitVM"));
        permissionsGranted.add(new LoggingPermission("control", null));

        //grant permission to install security manager :-)
        permissionsGranted.add(new RuntimePermission("setSecurityManager"));
    }
View Full Code Here

     */
    public static void setLog(OutputStream out) {
        SecurityManager mgr = System.getSecurityManager();

        if (mgr != null) {
            mgr.checkPermission(new LoggingPermission("control", null)); //$NON-NLS-1$
        }
        RMILog.getServerCallsLog().setOutputStream(out);
    }
View Full Code Here

     */
    public static void setLog(OutputStream out) {
        SecurityManager mgr = System.getSecurityManager();

        if (mgr != null) {
            mgr.checkPermission(new LoggingPermission("control", null)); //$NON-NLS-1$
        }
        RMILog.getServerCallsLog().setOutputStream(out);
    }
View Full Code Here

        // junit harness stuff
        permissionsGranted
                .add(new PropertyPermission("line.separator", "read"));
        permissionsGranted.add(new RuntimePermission("exitVM"));
        permissionsGranted.add(new LoggingPermission("control", null));

        //grant permission to install security manager :-)
        permissionsGranted.add(new RuntimePermission("setSecurityManager"));
    }
View Full Code Here

TOP

Related Classes of java.util.logging.LoggingPermission

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.