diff -r 4a79ad46e578 -r 1904e7ec236e hotspot/src/share/vm/services/management.cpp --- a/hotspot/src/share/vm/services/management.cpp Wed Jul 05 22:55:08 2017 +0200 +++ b/hotspot/src/share/vm/services/management.cpp Fri Feb 24 12:41:26 2017 -0500 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2017, 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 @@ -1953,7 +1953,8 @@ THROW_MSG_(vmSymbols::java_lang_NullPointerException(), "Output file name cannot be null.", -1); } - char* name = java_lang_String::as_platform_dependent_str(on, CHECK_(-1)); + Handle onhandle(THREAD, on); + char* name = java_lang_String::as_platform_dependent_str(onhandle, CHECK_(-1)); if (name == NULL) { THROW_MSG_(vmSymbols::java_lang_NullPointerException(), "Output file name cannot be null.", -1);