test/jdk/java/security/Provider/TestProvider.java
author prr
Fri, 25 May 2018 12:12:24 -0700
changeset 50347 b2f046ae8eb6
parent 47216 71c04702a3d5
permissions -rw-r--r--
Merge
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     1
/*
46898
4d2a6afafb76 8183310: java/security/modules/ModularTest.java should clean up better
ssahoo
parents: 40416
diff changeset
     2
 * Copyright (c) 2015, 2016, 2017 Oracle and/or its affiliates. All rights
4d2a6afafb76 8183310: java/security/modules/ModularTest.java should clean up better
ssahoo
parents: 40416
diff changeset
     3
 * reserved. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     4
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     7
 * published by the Free Software Foundation.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     8
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    13
 * accompanied this code).
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    14
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    18
 *
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    21
 * questions.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    22
 */
46898
4d2a6afafb76 8183310: java/security/modules/ModularTest.java should clean up better
ssahoo
parents: 40416
diff changeset
    23
package p;
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    24
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    25
import java.security.Provider;
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    26
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    27
/**
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    28
 * Custom Security provider for modular test.
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    29
 */
46898
4d2a6afafb76 8183310: java/security/modules/ModularTest.java should clean up better
ssahoo
parents: 40416
diff changeset
    30
public final class TestProvider extends Provider {
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    31
46898
4d2a6afafb76 8183310: java/security/modules/ModularTest.java should clean up better
ssahoo
parents: 40416
diff changeset
    32
    public TestProvider() {
4d2a6afafb76 8183310: java/security/modules/ModularTest.java should clean up better
ssahoo
parents: 40416
diff changeset
    33
        super("TestProvider", "1.0", "Test Security provider");
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    34
        System.out.println(String.format("TEST Security provider loaded"
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    35
                + " successfully : %s", this.toString()));
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    36
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    37
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    38
    @Override
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    39
    public String toString() {
46898
4d2a6afafb76 8183310: java/security/modules/ModularTest.java should clean up better
ssahoo
parents: 40416
diff changeset
    40
        return "TestProvider [getName()=" + getName()
40416
5d91b2fd668c 8130181: Deprecate java.security.Provider(String, double, String), add Provider(Strin
valeriep
parents: 36511
diff changeset
    41
                + ", getVersion()=" + getVersionStr() + ", getInfo()="
36511
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    42
                + getInfo() + ", toString()=" + super.toString() + "]";
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    43
    }
9d0388c6b336 8142968: Module System implementation
alanb
parents:
diff changeset
    44
}