Skip to content

SunReflectionFactoryInstantiator not working if parent class constructor isn't public #33

@henri-tremblay

Description

@henri-tremblay

Original issue 30 created by henri-tremblay on 2014-12-13T13:20:34.000Z:

just found while adapting fast serialization (github) to android.

What steps will reproduce the problem?

  1. Create Externalizable ArrayList Subclass
  2. use objenesis new instance
  3. add an element to the arraylist subclass (=> exception)

What is the expected output? What do you see instead?
no excpetion

What version of the product are you using? On what operating system?
2.1

Please provide any additional information below.

the issue is, SunReflectionFactoryInstantiator always uses the "newConstructorForSerialization". However if there is public noarg constructor for an externalizable, this should be used instead (else initial state might be wrong).

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions