< prev index next >

test/jdk/java/lang/ClassLoader/EndorsedDirs.java

Print this page
rev 51638 : [mq]: 8210112


   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8060206 8067366
  27  * @library /lib/testlibrary
  28  * @summary Endorsed standards and override mechanism is removed
  29  */
  30 
  31 import jdk.testlibrary.ProcessTools;
  32 
  33 import java.util.stream.Stream;
  34 
  35 public class EndorsedDirs {
  36     private static String TEST_CLASSES = System.getProperty("test.classes", ".");
  37 
  38     private static String[] VALUES = new String[] {
  39             null,
  40             "",
  41             "\"\""
  42     };
  43 
  44     public static void main(String... args) throws Exception {
  45         String value = System.getProperty("java.endorsed.dirs");
  46         System.out.format("java.endorsed.dirs = '%s'%n", value);
  47         if (args.length > 0) {
  48             int index = Integer.valueOf(args[0]);
  49             String expectedValue = VALUES[index];
  50             if (!(expectedValue == value ||
  51                     (value != null && value.isEmpty()) ||




   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  * @test
  26  * @bug 8060206 8067366
  27  * @library /test/lib
  28  * @summary Endorsed standards and override mechanism is removed
  29  */
  30 
  31 import jdk.test.lib.process.ProcessTools;
  32 
  33 import java.util.stream.Stream;
  34 
  35 public class EndorsedDirs {
  36     private static String TEST_CLASSES = System.getProperty("test.classes", ".");
  37 
  38     private static String[] VALUES = new String[] {
  39             null,
  40             "",
  41             "\"\""
  42     };
  43 
  44     public static void main(String... args) throws Exception {
  45         String value = System.getProperty("java.endorsed.dirs");
  46         System.out.format("java.endorsed.dirs = '%s'%n", value);
  47         if (args.length > 0) {
  48             int index = Integer.valueOf(args[0]);
  49             String expectedValue = VALUES[index];
  50             if (!(expectedValue == value ||
  51                     (value != null && value.isEmpty()) ||


< prev index next >