agent/src/share/classes/sun/jvm/hotspot/oops/OopField.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File
*** old/agent/src/share/classes/sun/jvm/hotspot/oops/OopField.java	Fri Mar 18 14:59:17 2011
--- new/agent/src/share/classes/sun/jvm/hotspot/oops/OopField.java	Fri Mar 18 14:59:17 2011

*** 1,7 **** --- 1,7 ---- /* ! * Copyright (c) 2000, 2002, Oracle and/or its affiliates. All rights reserved. ! * Copyright (c) 2000, 2011, 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.
*** 39,53 **** --- 39,59 ---- public OopField(InstanceKlass holder, int fieldArrayIndex) { super(holder, fieldArrayIndex); } public Oop getValue(Oop obj) { + if (!isVMField() && !obj.isInstance() && !obj.isArray()) { + throw new InternalError(); + } return obj.getHeap().newOop(getValueAsOopHandle(obj)); } /** Debugging support */ public OopHandle getValueAsOopHandle(Oop obj) { + if (!isVMField() && !obj.isInstance() && !obj.isArray()) { + throw new InternalError(obj.toString()); + } return obj.getHandle().getOopHandleAt(getOffset()); } public void setValue(Oop obj) throws MutationException { // Fix this: setOopAt is missing in Address

agent/src/share/classes/sun/jvm/hotspot/oops/OopField.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File