From 1c519a790ec2ae812b8e841778fc331d9c8b909a Mon Sep 17 00:00:00 2001 From: Avik Sengupta Date: Sun, 8 Jun 2003 12:30:43 +0000 Subject: [PATCH] for better diffing during debugging, implement a toString method in Ptg git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/branches/REL_2_BRANCH@353123 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/poi/hssf/record/formula/Ptg.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/java/org/apache/poi/hssf/record/formula/Ptg.java b/src/java/org/apache/poi/hssf/record/formula/Ptg.java index 7a6e094dc0..70b0606134 100644 --- a/src/java/org/apache/poi/hssf/record/formula/Ptg.java +++ b/src/java/org/apache/poi/hssf/record/formula/Ptg.java @@ -363,6 +363,14 @@ public abstract class Ptg return retval; } + /** Overridden toString method to ensure object hash is not printed. + * This helps get rid of gratuitous diffs when comparing two dumps + * Subclasses may output more relevant information by overriding this method + **/ + public String toString(){ + return this.getClass().toString(); + } + public static final byte CLASS_REF = 0x00; public static final byte CLASS_VALUE = 0x20; public static final byte CLASS_ARRAY = 0x40; -- 2.39.5