Mantis - Hessian
Viewing Issue Advanced Details
4273 major always 10-27-10 07:57 10-01-10 20:41
p_wright  
 
normal  
new 4.0.7  
open  
none    
none  
0004273: Serialization fails for java.net.URI and java.net.URL
When serialising java.net.URI or java.net.URL types the serialiser creates bad objects which behave incorrectly (losing their internal fields).

Serialising+deserialising a URI results in an object whose toString() method returns the same as before however whose getScheme(), getHost(), etc. methods return different values (null). This problem can be very difficult to detect.

URL has a more obvious failure mode, throwing a NullPointerException on toString()

Result of running the attached Test.java code (Java 1.6.0_22-b04 64-bit VM). The values before and after should not change (and equals() should return true, obviously)

  toString() http://www.example.com [^] => http://www.example.com [^]
 getScheme() http => null
   getHost() www.example.com => null
isAbsolute() true => false
    equals() false
 Test.java [^] (1,197 bytes) 10-27-10 07:57

Notes
(0004806)
mixueqiang   
10-01-10 20:41   
Hi, can I do some contribution for hessian? I want to take and fix some issues :)