< prev index next >

test/hotspot/jtreg/runtime/modules/ModuleOptionsWarn.java

Print this page
rev 59076 : [mq]: 8243945


  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 8162415
  27  * @summary Test warnings for ignored properties.
  28  * @modules java.base/jdk.internal.misc
  29  * @library /test/lib

  30  */
  31 
  32 import java.util.Map;
  33 import jdk.test.lib.process.OutputAnalyzer;
  34 import jdk.test.lib.process.ProcessTools;
  35 
  36 // Test that the VM behaves correctly when processing command line module system properties.
  37 public class ModuleOptionsWarn {
  38 
  39     public static void main(String[] args) throws Exception {
  40 
  41         // Test that a warning is not issued for extraneous jdk.module properties.
  42         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
  43             "-XX:+PrintWarnings", "-Djdk.module.ignored", "-version");
  44         OutputAnalyzer output = new OutputAnalyzer(pb.start());
  45         output.shouldNotContain("Ignoring system property option");
  46         output.shouldHaveExitValue(0);
  47 
  48         // Test that a warning is issued for a reserved jdk.module property.
  49         pb = ProcessTools.createJavaProcessBuilder(




  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 8162415
  27  * @summary Test warnings for ignored properties.
  28  * @modules java.base/jdk.internal.misc
  29  * @library /test/lib
  30  * @run driver ModuleOptionsWarn
  31  */
  32 
  33 import java.util.Map;
  34 import jdk.test.lib.process.OutputAnalyzer;
  35 import jdk.test.lib.process.ProcessTools;
  36 
  37 // Test that the VM behaves correctly when processing command line module system properties.
  38 public class ModuleOptionsWarn {
  39 
  40     public static void main(String[] args) throws Exception {
  41 
  42         // Test that a warning is not issued for extraneous jdk.module properties.
  43         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
  44             "-XX:+PrintWarnings", "-Djdk.module.ignored", "-version");
  45         OutputAnalyzer output = new OutputAnalyzer(pb.start());
  46         output.shouldNotContain("Ignoring system property option");
  47         output.shouldHaveExitValue(0);
  48 
  49         // Test that a warning is issued for a reserved jdk.module property.
  50         pb = ProcessTools.createJavaProcessBuilder(


< prev index next >