Path: blob/jdk8u272-b10-aarch32-20201026/jdk/test/java/rmi/testlibrary/TestParams.java
83402 views
/*1* Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223/**24*25*/26import java.io.File;2728/**29* Setup static variables to represent properties in test environment.30*/31public class TestParams {3233/** variables that hold value property values */34public static String testSrc = null;35public static String testClasses = null;3637/** name of default security policy */38public static String defaultPolicy = null;3940/** name of default security policy for RMID */41public static String defaultRmidPolicy = null;4243/** name of default security policy for activation groups */44public static String defaultGroupPolicy = null;4546/** name of default security manager */47public static String defaultSecurityManager =48"java.rmi.RMISecurityManager";495051/* Initalize commonly used strings */52static {53try {54testSrc = TestLibrary.55getProperty("test.src", ".");56testClasses = TestLibrary.57getProperty("test.classes", ".");5859// if policy file already set use it60defaultPolicy = TestLibrary.61getProperty("java.security.policy",62defaultPolicy);63if (defaultPolicy == null) {64defaultPolicy = testSrc + File.separatorChar +65"security.policy";66}6768// if manager prop set use it69defaultSecurityManager = TestLibrary.70getProperty("java.security.manager",71defaultSecurityManager);7273defaultRmidPolicy =74testSrc + File.separatorChar + "rmid.security.policy";7576defaultGroupPolicy = testSrc +77File.separatorChar + "group.security.policy";7879} catch (SecurityException se) {80TestLibrary.bomb("Security exception received" +81" during test initialization:",82se);83}84}85}868788