Mercurial > hg > graal-jvmci-8
comparison test/runtime/CommandLine/ConfigFileWarning.java @ 17667:cd7a42c7be06
8027314: Java should recognize Diagnostic options if -XX:+UnlockDiagnosticVMOptions is not specified and print an informative message
Summary: clarifying the error messages associated with vm options of type diagnostic, experimental, develop, and notproduct
Reviewed-by: kvn, twisti, ctornqvi
author | ccheung |
---|---|
date | Thu, 16 Jan 2014 10:51:16 -0800 |
parents | 2bffd20a0fcc |
children | 4ca6dc0799b6 |
comparison
equal
deleted
inserted
replaced
17666:a81bc2b2c4d3 | 17667:cd7a42c7be06 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2013, 2014, 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. |
31 import java.io.PrintWriter; | 31 import java.io.PrintWriter; |
32 import com.oracle.java.testlibrary.*; | 32 import com.oracle.java.testlibrary.*; |
33 | 33 |
34 public class ConfigFileWarning { | 34 public class ConfigFileWarning { |
35 public static void main(String[] args) throws Exception { | 35 public static void main(String[] args) throws Exception { |
36 String vmVersion = System.getProperty("java.vm.version"); | 36 if (Platform.isDebugBuild()) { |
37 if (vmVersion.toLowerCase().contains("debug") || vmVersion.toLowerCase().contains("jvmg")) { | |
38 System.out.println("Skip on debug builds since we'll always read the file there"); | 37 System.out.println("Skip on debug builds since we'll always read the file there"); |
39 return; | 38 return; |
40 } | 39 } |
41 | 40 |
42 PrintWriter pw = new PrintWriter(".hotspotrc"); | 41 PrintWriter pw = new PrintWriter(".hotspotrc"); |