1 /* |
1 /* |
2 * Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1998, 2018, 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. |
1947 Klass* ClassVerifier::load_class(Symbol* name, TRAPS) { |
1947 Klass* ClassVerifier::load_class(Symbol* name, TRAPS) { |
1948 // Get current loader and protection domain first. |
1948 // Get current loader and protection domain first. |
1949 oop loader = current_class()->class_loader(); |
1949 oop loader = current_class()->class_loader(); |
1950 oop protection_domain = current_class()->protection_domain(); |
1950 oop protection_domain = current_class()->protection_domain(); |
1951 |
1951 |
1952 Klass* kls = SystemDictionary::resolve_or_fail( |
1952 return SystemDictionary::resolve_or_fail( |
1953 name, Handle(THREAD, loader), Handle(THREAD, protection_domain), |
1953 name, Handle(THREAD, loader), Handle(THREAD, protection_domain), |
1954 true, CHECK_NULL); |
1954 true, CHECK_NULL); |
1955 current_class()->class_loader_data()->record_dependency(kls, CHECK_NULL); |
|
1956 return kls; |
|
1957 } |
1955 } |
1958 |
1956 |
1959 bool ClassVerifier::is_protected_access(instanceKlassHandle this_class, |
1957 bool ClassVerifier::is_protected_access(instanceKlassHandle this_class, |
1960 Klass* target_class, |
1958 Klass* target_class, |
1961 Symbol* field_name, |
1959 Symbol* field_name, |