comparison test/runtime/CommandLine/CompilerConfigFileWarning.java @ 14276:234d576115b5

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
14275:efc27a069897 14276:234d576115b5
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 CompilerConfigFileWarning { 34 public class CompilerConfigFileWarning {
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(".hotspot_compiler"); 41 PrintWriter pw = new PrintWriter(".hotspot_compiler");