test/jdk/java/security/BasicPermission/Wildcard.java
changeset 53972 43c2ab1bdfd3
parent 47216 71c04702a3d5
equal deleted inserted replaced
53971:1019c97e1bde 53972:43c2ab1bdfd3
     1 /*
     1 /*
     2  * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    31  * @test
    31  * @test
    32  * @bug 7167056
    32  * @bug 7167056
    33  * @summary Check that BasicPermission subclasses don't throw exception if name
    33  * @summary Check that BasicPermission subclasses don't throw exception if name
    34  *          contains wildcard character ("*") but does not signify a
    34  *          contains wildcard character ("*") but does not signify a
    35  *          wildcard match
    35  *          wildcard match
    36  * @modules java.base/com.sun.net.ssl
    36  * @modules java.sql
    37  *          java.sql
       
    38  */
    37  */
    39 
    38 
    40 public class Wildcard {
    39 public class Wildcard {
    41 
    40 
    42     public static void main(String[] args) throws Exception {
    41     public static void main(String[] args) throws Exception {
    49         new RuntimePermission(wildcard);
    48         new RuntimePermission(wildcard);
    50         new NetPermission(wildcard);
    49         new NetPermission(wildcard);
    51         new SQLPermission(wildcard);
    50         new SQLPermission(wildcard);
    52         new PropertyPermission(wildcard, "read");
    51         new PropertyPermission(wildcard, "read");
    53         new SSLPermission(wildcard);
    52         new SSLPermission(wildcard);
    54         new com.sun.net.ssl.SSLPermission(wildcard);
       
    55     }
    53     }
    56 }
    54 }