hotspot/src/share/vm/classfile/stringTable.cpp
changeset 46271 979ebd346ecf
parent 42057 6a5b8ebcd3f2
child 46369 3bf4544bec14
equal deleted inserted replaced
46270:2e7898927798 46271:979ebd346ecf
     1 /*
     1 /*
     2  * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 1997, 2017, 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.
   234 
   234 
   235   debug_only(StableMemoryChecker smc(name, len * sizeof(name[0])));
   235   debug_only(StableMemoryChecker smc(name, len * sizeof(name[0])));
   236   assert(!Universe::heap()->is_in_reserved(name),
   236   assert(!Universe::heap()->is_in_reserved(name),
   237          "proposed name of symbol must be stable");
   237          "proposed name of symbol must be stable");
   238 
   238 
       
   239   HandleMark hm(THREAD);  // cleanup strings created
   239   Handle string;
   240   Handle string;
   240   // try to reuse the string if possible
   241   // try to reuse the string if possible
   241   if (!string_or_null.is_null()) {
   242   if (!string_or_null.is_null()) {
   242     string = string_or_null;
   243     string = string_or_null;
   243   } else {
   244   } else {