aboutsummaryrefslogtreecommitdiff
path: root/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
diff options
context:
space:
mode:
authorjiangli <none@none>2012-07-13 20:14:27 -0400
committerjiangli <none@none>2012-07-13 20:14:27 -0400
commit1f0952904d83c0ddc6db527b32f02242cbd33f67 (patch)
tree0ee20bf3b273e443943a12258b29f73beb554592 /agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
parentee19b080e9911f25d733ed357962bf35ae0156f0 (diff)
parent96b276d261c2b3de763bff86bb5c94826bb033b2 (diff)
Merge
Diffstat (limited to 'agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java')
-rw-r--r--agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java60
1 files changed, 31 insertions, 29 deletions
diff --git a/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java b/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
index b8d5c8bab..2ab2bf6e2 100644
--- a/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
+++ b/agent/src/share/classes/sun/jvm/hotspot/ui/classbrowser/HTMLGenerator.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2012, 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
@@ -783,37 +783,39 @@ public class HTMLGenerator implements /* imports */ ClassConstants {
});
// display exception table for this method
- TypeArray exceptionTable = method.getExceptionTable();
- // exception table is 4 tuple array of shorts
- int numEntries = (int)exceptionTable.getLength() / 4;
- if (numEntries != 0) {
- buf.h4("Exception Table");
- buf.beginTable(1);
- buf.beginTag("tr");
- buf.headerCell("start bci");
- buf.headerCell("end bci");
- buf.headerCell("handler bci");
- buf.headerCell("catch type");
- buf.endTag("tr");
-
- for (int e = 0; e < numEntries; e += 4) {
+ boolean hasException = method.hasExceptionTable();
+ if (hasException) {
+ ExceptionTableElement[] exceptionTable = method.getExceptionTable();
+ int numEntries = exceptionTable.length;
+ if (numEntries != 0) {
+ buf.h4("Exception Table");
+ buf.beginTable(1);
buf.beginTag("tr");
- buf.cell(Integer.toString(exceptionTable.getIntAt(e)));
- buf.cell(Integer.toString(exceptionTable.getIntAt(e + 1)));
- buf.cell(Integer.toString(exceptionTable.getIntAt(e + 2)));
- short cpIndex = (short) exceptionTable.getIntAt(e + 3);
- ConstantPool.CPSlot obj = cpIndex == 0? null : cpool.getSlotAt(cpIndex);
- if (obj == null) {
- buf.cell("Any");
- } else if (obj.isMetaData()) {
- buf.cell(obj.getSymbol().asString().replace('/', '.'));
- } else {
- buf.cell(genKlassLink((InstanceKlass)obj.getOop()));
- }
+ buf.headerCell("start bci");
+ buf.headerCell("end bci");
+ buf.headerCell("handler bci");
+ buf.headerCell("catch type");
buf.endTag("tr");
- }
- buf.endTable();
+ for (int e = 0; e < numEntries; e ++) {
+ buf.beginTag("tr");
+ buf.cell(Integer.toString(exceptionTable[e].getStartPC()));
+ buf.cell(Integer.toString(exceptionTable[e].getEndPC()));
+ buf.cell(Integer.toString(exceptionTable[e].getHandlerPC()));
+ short cpIndex = (short) exceptionTable[e].getCatchTypeIndex();
+ ConstantPool.CPSlot obj = cpIndex == 0? null : cpool.getSlotAt(cpIndex);
+ if (obj == null) {
+ buf.cell("Any");
+ } else if (obj.isMetaData()) {
+ buf.cell(obj.getSymbol().asString().replace('/', '.'));
+ } else {
+ buf.cell(genKlassLink((InstanceKlass)obj.getOop()));
+ }
+ buf.endTag("tr");
+ }
+
+ buf.endTable();
+ }
}
// display constant pool hyperlink