added a comment -
24/Apr/09 10:03 PM Looking at the Objenesis docs, there are two strategies to instantiate objects.
There are many different strategies that Objenesis uses for instantiating objects based on the JVM vendor, JVM version, SecurityManager and type of class being instantiated.
We have defined that two different kinds of instantiation are required:
* Stardard - No constructor will be called
* Serializable compliant - Acts like an object instantiated by java standard serialization. It means that the constructor of the first non-serializable parent class will be called. However, readResolve is not called and we never check if the object is serializable.
So, having an attribute that determines if it uses the standard or Serializable compliant might fix this.
There are many different strategies that Objenesis uses for instantiating objects based on the JVM vendor, JVM version, SecurityManager and type of class being instantiated.
We have defined that two different kinds of instantiation are required:
* Stardard - No constructor will be called
* Serializable compliant - Acts like an object instantiated by java standard serialization. It means that the constructor of the first non-serializable parent class will be called. However, readResolve is not called and we never check if the object is serializable.
So, having an attribute that determines if it uses the standard or Serializable compliant might fix this.