test/hotspot/jtreg/runtime/appcds/jigsaw/overridetests/OverrideTests.java
changeset 53636 962ed57b29c9
parent 51990 6003e034cdd8
child 54927 1512d88b24c6
equal deleted inserted replaced
53635:247e5ca412f5 53636:962ed57b29c9
     1 /*
     1 /*
     2  * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2015, 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.
   157         String mid = TEST_MODULE + "/" + MAIN_CLASS;
   157         String mid = TEST_MODULE + "/" + MAIN_CLASS;
   158         OutputAnalyzer output;
   158         OutputAnalyzer output;
   159         boolean isAppLoader = loaderName.equals("app");
   159         boolean isAppLoader = loaderName.equals("app");
   160         int upgradeModIdx = isAppLoader ? 0 : 1;
   160         int upgradeModIdx = isAppLoader ? 0 : 1;
   161         String expectedException = "java.lang.module.FindException: Unable to compute the hash";
   161         String expectedException = "java.lang.module.FindException: Unable to compute the hash";
   162         String prefix[] = new String[4];
   162         String prefix[] = new String[3];
   163         prefix[0] = "-cp";
   163         prefix[0] = "-Djava.class.path=";
   164         prefix[1] = "\"\"";
   164         prefix[1] = "--add-modules";
   165         prefix[2] = "--add-modules";
   165         prefix[2] = "java.net.http";
   166         prefix[3] = "java.net.http";
       
   167 
   166 
   168         // Run the test with --upgrade-module-path set to alternate location of archiveClass
   167         // Run the test with --upgrade-module-path set to alternate location of archiveClass
   169         // The alternate version of archiveClass SHOULD be found.
   168         // The alternate version of archiveClass SHOULD be found.
   170         TestCommon.runWithModules(prefix,
   169         TestCommon.runWithModules(prefix,
   171                                   UPGRADEDMODS_DIR[upgradeModIdx].toString(),
   170                                   UPGRADEDMODS_DIR[upgradeModIdx].toString(),