Skip to content

Commit

Permalink
Merge branch '3.x' of github.com:sofastack/sofa-hessian into sofaboot…
Browse files Browse the repository at this point in the history
…-4.0-support
  • Loading branch information
liujianjun.ljj committed Aug 21, 2023
2 parents e02ad97 + 39b1dcb commit 7744812
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ else if (object instanceof byte[]) {
*/
public void writeCustomObject(Object object)
throws IOException {
throw new IOException("unexpected object: " + object);
throw new IOException("unexpected object: " + object.getClass().getName());
}

/**
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/caucho/hessian/io/AbstractDeserializer.java
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 All @@ -92,7 +92,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 @@ -382,7 +382,7 @@ else if (object instanceof byte[]) {
*/
public void writeCustomObject(Object object)
throws IOException {
throw new IOException("unexpected object: " + object);
throw new IOException("unexpected object: " + object.getClass().getName());
}

/**
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/com/caucho/hessian/server/HessianSkeleton.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ public HessianSkeleton(Object service, Class apiClass)
_service = service;

if (!apiClass.isAssignableFrom(service.getClass()))
throw new IllegalArgumentException("Service " + service + " must be an instance of " + apiClass.getName());
throw new IllegalArgumentException("Service " + service.getClass().getName() + " must be an instance of " +
apiClass.getName());
}

/**
Expand Down

0 comments on commit 7744812

Please sign in to comment.