1 /* |
1 /* |
2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2014, 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. |
4498 super_m = InstanceKlass::cast(k)->lookup_method(name, signature); |
4498 super_m = InstanceKlass::cast(k)->lookup_method(name, signature); |
4499 if (super_m == NULL) { |
4499 if (super_m == NULL) { |
4500 break; // didn't find any match; get out |
4500 break; // didn't find any match; get out |
4501 } |
4501 } |
4502 |
4502 |
4503 if (super_m->is_final() && |
4503 if (super_m->is_final() && !super_m->is_static() && |
4504 // matching method in super is final |
4504 // matching method in super is final, and not static |
4505 (Reflection::verify_field_access(this_klass(), |
4505 (Reflection::verify_field_access(this_klass(), |
4506 super_m->method_holder(), |
4506 super_m->method_holder(), |
4507 super_m->method_holder(), |
4507 super_m->method_holder(), |
4508 super_m->access_flags(), false)) |
4508 super_m->access_flags(), false)) |
4509 // this class can access super final method and therefore override |
4509 // this class can access super final method and therefore override |