src/share/vm/oops/klassVtable.cpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1997, 2014, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 1997, 2015, 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 * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 1188,1197 **** --- 1188,1211 ---- ime++; } } #if INCLUDE_JVMTI + // Update old Unsafe.throwIllegalAccessError entries + void klassItable::update_throw_illegal_access_entries() { + itableMethodEntry* ime = method_entry(0); + for(int i = 0; i < _size_method_table; i++) { + Method* m = ime->method(); + if (m != NULL && m->is_valid() && m->is_old() && + m->name() == vmSymbols::throwIllegalAccessError_name()) { + // replace old Unsafe.throwIllegalAccessError() method with latest version + ime->initialize(Universe::throw_illegal_access_error()); + } + ime++; + } + } + void klassItable::adjust_method_entries(Method** old_methods, Method** new_methods, int methods_length, bool * trace_name_printed) { // search the itable for uses of either obsolete or EMCP methods for (int j = 0; j < methods_length; j++) { Method* old_method = old_methods[j];