--- a/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java Wed Mar 30 03:48:38 2011 -0700
+++ b/hotspot/agent/src/share/classes/sun/jvm/hotspot/runtime/VM.java Wed Mar 30 07:47:19 2011 -0700
@@ -839,20 +839,18 @@
}
private void readSystemProperties() {
- final InstanceKlass systemKls = getSystemDictionary().getSystemKlass();
- systemKls.iterate(new DefaultOopVisitor() {
- ObjectReader objReader = new ObjectReader();
- public void doOop(sun.jvm.hotspot.oops.OopField field, boolean isVMField) {
- if (field.getID().getName().equals("props")) {
- try {
- sysProps = (Properties) objReader.readObject(field.getValue(systemKls.getJavaMirror()));
- } catch (Exception e) {
- if (Assert.ASSERTS_ENABLED) {
- e.printStackTrace();
- }
- }
- }
- }
- }, false);
+ final InstanceKlass systemKls = getSystemDictionary().getSystemKlass();
+ systemKls.iterateStaticFields(new DefaultOopVisitor() {
+ ObjectReader objReader = new ObjectReader();
+ public void doOop(sun.jvm.hotspot.oops.OopField field, boolean isVMField) {
+ if (field.getID().getName().equals("props")) {
+ try {
+ sysProps = (Properties) objReader.readObject(field.getValue(getObj()));
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ }
+ }
+ });
}
}