Skip to content

Commit 053cf3f

Browse files
committed
Cleanup - do not duplicate InstanceNode.IncludingNull code
1 parent 3299bf1 commit 053cf3f

File tree

1 file changed

+1
-27
lines changed

1 file changed

+1
-27
lines changed

visualvm/heapviewer/src/org/graalvm/visualvm/heapviewer/java/impl/JavaFieldsPlugin.java

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ protected String getNodesContainerString(String firstNodeIdx, String lastNodeIdx
569569

570570
}
571571

572-
static abstract class InstanceFieldValueNode extends InstanceNode {
572+
static abstract class InstanceFieldValueNode extends InstanceNode.IncludingNull {
573573

574574
private final int valuesCount;
575575

@@ -585,32 +585,6 @@ public int getValuesCount() {
585585
}
586586

587587

588-
public JavaClass getJavaClass() {
589-
if (getInstance() == null) return null;
590-
else return super.getJavaClass();
591-
}
592-
593-
public String getName(Heap heap) {
594-
if (getInstance() == null) return "null"; // NOI18N
595-
else return super.getName(heap);
596-
}
597-
598-
public String getLogicalValue(Heap heap) {
599-
if (getInstance() == null) return DataType.LOGICAL_VALUE.getNoValue();
600-
else return super.getLogicalValue(heap);
601-
}
602-
603-
public long getOwnSize() {
604-
if (getInstance() == null) return DataType.OWN_SIZE.getNoValue();
605-
else return super.getOwnSize();
606-
}
607-
608-
public long getRetainedSize(Heap heap) {
609-
if (getInstance() == null) return DataType.RETAINED_SIZE.valuesAvailable(heap) ?
610-
DataType.RETAINED_SIZE.getNoValue() : DataType.RETAINED_SIZE.getNotAvailableValue();
611-
else return super.getRetainedSize(heap);
612-
}
613-
614588
public boolean equals(Object o) {
615589
if (o == this) return true;
616590
if (!(o instanceof InstanceFieldValueNode)) return false;

0 commit comments

Comments
 (0)