Skip to content

Commit a35a4e5

Browse files
authored
Remove toString calling
Remove toString calling
2 parents bab558f + ca45bf8 commit a35a4e5

6 files changed

Lines changed: 8 additions & 6 deletions

File tree

src/main/java/com/alibaba/com/caucho/hessian/io/AbstractDeserializer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public Object readObject(AbstractHessianInput in)
6767
String className = getClass().getName();
6868

6969
if (obj != null)
70-
throw error(className + ": unexpected object " + obj.getClass().getName() + " (" + obj + ")");
70+
throw error(className + ": unexpected object " + obj.getClass().getName());
7171
else
7272
throw error(className + ": unexpected null value");
7373
}
@@ -108,7 +108,7 @@ public Object readMap(AbstractHessianInput in)
108108
String className = getClass().getName();
109109

110110
if (obj != null)
111-
throw error(className + ": unexpected object " + obj.getClass().getName() + " (" + obj + ")");
111+
throw error(className + ": unexpected object " + obj.getClass().getName());
112112
else
113113
throw error(className + ": unexpected null value");
114114
}

src/main/java/com/alibaba/com/caucho/hessian/io/AbstractListDeserializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ public Object readObject(AbstractHessianInput in)
6060
Object obj = in.readObject();
6161

6262
if (obj != null)
63-
throw error("expected list at " + obj.getClass().getName() + " (" + obj + ")");
63+
throw error("expected list at " + obj.getClass().getName());
6464
else
6565
throw error("expected list at null");
6666
}

src/main/java/com/alibaba/com/caucho/hessian/io/AbstractMapDeserializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public Object readObject(AbstractHessianInput in)
6767
Object obj = in.readObject();
6868

6969
if (obj != null)
70-
throw error("expected map/object at " + obj.getClass().getName() + " (" + obj + ")");
70+
throw error("expected map/object at " + obj.getClass().getName());
7171
else
7272
throw error("expected map/object at null");
7373
}

src/main/java/com/alibaba/com/caucho/hessian/io/Hessian2Input.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3563,7 +3563,7 @@ protected IOException expect(String expect, int ch)
35633563
if (obj != null) {
35643564
return error("expected " + expect
35653565
+ " at 0x" + Integer.toHexString(ch & 0xff)
3566-
+ " " + obj.getClass().getName() + " (" + obj + ")");
3566+
+ " " + obj.getClass().getName());
35673567
} else
35683568
return error("expected " + expect
35693569
+ " at 0x" + Integer.toHexString(ch & 0xff) + " null");

src/main/java/com/alibaba/com/caucho/hessian/io/JavaDeserializer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ else if (e instanceof IOException)
168168
throw new HessianFieldException(fieldName + ": " + e.getMessage(), e);
169169

170170
if (value != null)
171-
throw new HessianFieldException(fieldName + ": " + value.getClass().getName() + " (" + value + ")"
171+
throw new HessianFieldException(fieldName + ": " + value.getClass().getName()
172172
+ " cannot be assigned to '" + field.getType().getName() + "'", e);
173173
else
174174
throw new HessianFieldException(fieldName + ": " + field.getType().getName() + " cannot be assigned from null", e);

src/main/resources/DENY_CLASS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ com.sun.rowset.
4343
com.sun.xml.internal.bind.v2.
4444
com.taobao.vipserver.commons.collections.functors.
4545
groovy.lang.
46+
java.awt.
4647
java.beans.
4748
java.lang.ProcessBuilder
4849
java.lang.Runtime
@@ -59,6 +60,7 @@ javax.media.jai.remote.
5960
javax.naming.
6061
javax.script.
6162
javax.sound.sampled.
63+
javax.swing.
6264
javax.xml.transform.
6365
net.bytebuddy.dynamic.loading.
6466
oracle.jdbc.connector.

0 commit comments

Comments
 (0)