Skip to content

Commit

Permalink
Remove toString calling
Browse files Browse the repository at this point in the history
Remove toString calling
  • Loading branch information
AlbumenJ committed Nov 21, 2021
2 parents bab558f + ca45bf8 commit a35a4e5
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public Object readObject(AbstractHessianInput in)
String className = getClass().getName();

if (obj != null)
throw error(className + ": unexpected object " + obj.getClass().getName() + " (" + obj + ")");
throw error(className + ": unexpected object " + obj.getClass().getName());
else
throw error(className + ": unexpected null value");
}
Expand Down Expand Up @@ -108,7 +108,7 @@ public Object readMap(AbstractHessianInput in)
String className = getClass().getName();

if (obj != null)
throw error(className + ": unexpected object " + obj.getClass().getName() + " (" + obj + ")");
throw error(className + ": unexpected object " + obj.getClass().getName());
else
throw error(className + ": unexpected null value");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public Object readObject(AbstractHessianInput in)
Object obj = in.readObject();

if (obj != null)
throw error("expected list at " + obj.getClass().getName() + " (" + obj + ")");
throw error("expected list at " + obj.getClass().getName());
else
throw error("expected list at null");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public Object readObject(AbstractHessianInput in)
Object obj = in.readObject();

if (obj != null)
throw error("expected map/object at " + obj.getClass().getName() + " (" + obj + ")");
throw error("expected map/object at " + obj.getClass().getName());
else
throw error("expected map/object at null");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3563,7 +3563,7 @@ protected IOException expect(String expect, int ch)
if (obj != null) {
return error("expected " + expect
+ " at 0x" + Integer.toHexString(ch & 0xff)
+ " " + obj.getClass().getName() + " (" + obj + ")");
+ " " + obj.getClass().getName());
} else
return error("expected " + expect
+ " at 0x" + Integer.toHexString(ch & 0xff) + " null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ else if (e instanceof IOException)
throw new HessianFieldException(fieldName + ": " + e.getMessage(), e);

if (value != null)
throw new HessianFieldException(fieldName + ": " + value.getClass().getName() + " (" + value + ")"
throw new HessianFieldException(fieldName + ": " + value.getClass().getName()
+ " cannot be assigned to '" + field.getType().getName() + "'", e);
else
throw new HessianFieldException(fieldName + ": " + field.getType().getName() + " cannot be assigned from null", e);
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/DENY_CLASS
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ com.sun.rowset.
com.sun.xml.internal.bind.v2.
com.taobao.vipserver.commons.collections.functors.
groovy.lang.
java.awt.
java.beans.
java.lang.ProcessBuilder
java.lang.Runtime
Expand All @@ -59,6 +60,7 @@ javax.media.jai.remote.
javax.naming.
javax.script.
javax.sound.sampled.
javax.swing.
javax.xml.transform.
net.bytebuddy.dynamic.loading.
oracle.jdbc.connector.
Expand Down

0 comments on commit a35a4e5

Please sign in to comment.