JDK-8092297: Implement Serializable in Properties

Kevin Rushforth kevin.rushforth at oracle.com
Thu Oct 18 11:25:27 UTC 2018


I think implementing this would be a mistake, especially given that the 
long-term direction for Java is to move away from the existing 
serialization mechanism. There have many discussions on the security and 
integrity problems with the Java serialization, so I won't rehash them here.

It might be best to close JDK-8092297 as "Won't fix" so no one is under 
any illusion that this is likely to happen.

-- Kevin


On 10/18/2018 4:11 AM, Pavel Kasotov wrote:
> Hi all,
>
> I suggest to increase the priority of the issue JDK-8092297. My 
> suggestion I explain
> this way - without possibility to serialize Properties it is rather 
> difficult to use JavaFX
> for enterprise applications that in most cases use a client-server 
> architecture.
>
> For example, there is a RMI client and a server and from the server we 
> need to pass
> some User. In order we could do it we need User were serializable. If 
> we want
> to use JavaFX we would like to do the following:
>
> class User implements Serializable {
>
>         private final StringProperty name = new SimpleStringProperty();
>         ....
> }
>
> However it won't work because properties are not serializable. So, we 
> have two workarounds:
> 1) implement writeObject() and readObject()
> 2) make User with String and implement UserAdapter
>
> Both ways are not good because they require a lot of manual work and 
> make solution more
> difficult.
>
> Best regards, Pavel



More information about the openjfx-discuss mailing list