comparison src/share/vm/prims/jniCheck.cpp @ 2376:c7f3d0b4570f

7017732: move static fields into Class to prepare for perm gen removal Reviewed-by: kvn, coleenp, twisti, stefank
author never
date Fri, 18 Mar 2011 16:00:34 -0700
parents b92c45f2bc75
children a6eef545f1a2
comparison
equal deleted inserted replaced
2375:d673ef06fe96 2376:c7f3d0b4570f
1 /* 1 /*
2 * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2001, 2011, 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.
222 klassOop f_oop = id->holder(); 222 klassOop f_oop = id->holder();
223 if (!instanceKlass::cast(k_oop)->is_subtype_of(f_oop)) 223 if (!instanceKlass::cast(k_oop)->is_subtype_of(f_oop))
224 ReportJNIFatalError(thr, fatal_wrong_static_field); 224 ReportJNIFatalError(thr, fatal_wrong_static_field);
225 225
226 /* check for proper field type */ 226 /* check for proper field type */
227 if (!instanceKlass::cast(f_oop)->find_local_field_from_offset( 227 if (!id->find_local_field(&fd))
228 id->offset(), true, &fd))
229 ReportJNIFatalError(thr, fatal_static_field_not_found); 228 ReportJNIFatalError(thr, fatal_static_field_not_found);
230 if ((fd.field_type() != ftype) && 229 if ((fd.field_type() != ftype) &&
231 !(fd.field_type() == T_ARRAY && ftype == T_OBJECT)) { 230 !(fd.field_type() == T_ARRAY && ftype == T_OBJECT)) {
232 ReportJNIFatalError(thr, fatal_static_field_mismatch); 231 ReportJNIFatalError(thr, fatal_static_field_mismatch);
233 } 232 }