From e6ab8dc2e7ddc9ba64cfa46742e55948c0e57791 Mon Sep 17 00:00:00 2001 From: Jeroen Frijters Date: Fri, 24 Sep 2004 05:58:28 +0000 Subject: [PATCH] 2004-09-24 Jeroen Frijters * java/lang/StackTraceElement.java (className): Renamed field to declaringClass to be compatible with Sun serialization format. From-SVN: r88012 --- libjava/ChangeLog | 6 ++++++ libjava/java/lang/StackTraceElement.java | 14 +++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/libjava/ChangeLog b/libjava/ChangeLog index acc03bfb717..c48fea108bb 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,9 @@ +2004-09-24 Jeroen Frijters + + * java/lang/StackTraceElement.java + (className): Renamed field to declaringClass to be compatible + with Sun serialization format. + 2004-09-23 Michael Koch * java/applet/AppletContext.java, diff --git a/libjava/java/lang/StackTraceElement.java b/libjava/java/lang/StackTraceElement.java index d9e8a31b724..e1e07f3fb2d 100644 --- a/libjava/java/lang/StackTraceElement.java +++ b/libjava/java/lang/StackTraceElement.java @@ -77,7 +77,7 @@ public class StackTraceElement implements Serializable * * @serial the enclosing class, if known */ - private final String className; + private final String declaringClass; /** * The method name in the class, null if unknown. @@ -106,7 +106,7 @@ public class StackTraceElement implements Serializable { this.fileName = fileName; this.lineNumber = lineNumber; - this.className = className; + this.declaringClass = className; this.methodName = methodName; this.isNative = isNative; } @@ -142,7 +142,7 @@ public class StackTraceElement implements Serializable */ public String getClassName() { - return className; + return declaringClass; } /** @@ -183,9 +183,9 @@ public class StackTraceElement implements Serializable public String toString() { StringBuffer sb = new StringBuffer(); - if (className != null) + if (declaringClass != null) { - sb.append(className); + sb.append(declaringClass); if (methodName != null) sb.append('.'); } @@ -217,7 +217,7 @@ public class StackTraceElement implements Serializable StackTraceElement e = (StackTraceElement) o; return equals(fileName, e.fileName) && lineNumber == e.lineNumber - && equals(className, e.className) + && equals(declaringClass, e.declaringClass) && equals(methodName, e.methodName); } @@ -230,7 +230,7 @@ public class StackTraceElement implements Serializable */ public int hashCode() { - return hashCode(fileName) ^ lineNumber ^ hashCode(className) + return hashCode(fileName) ^ lineNumber ^ hashCode(declaringClass) ^ hashCode(methodName); } -- 2.30.2