8147494: com/sun/management/HotSpotDiagnosticMXBean/CheckOrigin.java fails with "java.lang.IllegalArgumentException: VM option 'TraceExceptions' does not exist"

Substituted "CheckJNICalls" for "TraceExceptions" product option in test

Reviewed-by: hseigel, coleenp, dcubed
This commit is contained in:
Rachel Protacio 2016-01-19 16:20:01 -05:00
parent a10777c5a7
commit 9220796efc

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -71,7 +71,7 @@ public class CheckOrigin {
Map<String, String> env = pb.environment();
// "UseCMSGC" should be ignored.
env.put("_JAVA_OPTIONS", "-XX:+TraceExceptions -XX:+UseCMSGC");
env.put("_JAVA_OPTIONS", "-XX:+CheckJNICalls -XX:+UseCMSGC");
// "UseGOneGC" should be ignored.
env.put("JAVA_TOOL_OPTIONS", "-XX:+IgnoreUnrecognizedVMOptions "
+ "-XX:+PrintVMOptions -XX:+UseGOneGC");
@ -99,7 +99,7 @@ public class CheckOrigin {
// Set on the command line
checkOrigin("UseCodeAging", Origin.VM_CREATION);
// Set in _JAVA_OPTIONS
checkOrigin("TraceExceptions", Origin.ENVIRON_VAR);
checkOrigin("CheckJNICalls", Origin.ENVIRON_VAR);
// Set in JAVA_TOOL_OPTIONS
checkOrigin("IgnoreUnrecognizedVMOptions", Origin.ENVIRON_VAR);
checkOrigin("PrintVMOptions", Origin.ENVIRON_VAR);