[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Re: Deserializing javafx.event.EventType
From:       Martin Sladecek <martin.sladecek () oracle ! com>
Date:       2014-06-30 7:01:53
Message-ID: 53B10B61.4060001 () oracle ! com
[Download RAW message or body]

Hi,
EventTypes are serializable solely for the purpose of Event 
serialization (which is serializable because it inherits from 
java.util.EventObject).
When you deserialize Events, the corresponding EventType objects are 
already initialized, so the EventTypes are correctly mapped.

-Martin

On 06/28/2014 09:29 AM, Kay McCormick wrote:
> Hello,
>
> I was poking around in javafx event dispatching and I noted the
> serialization of EventType. I've serialized MouseEvent.ANY to a file and in
> trying to deserialize it I got the error:
>
> java.io.InvalidObjectException: Cannot find event type "INPUT" (of EVENT)
>
> I realize this is because the static fields have not been initialized, but
> I am wondering what is the intended and proper use of serializing
> EventType. Is it a requirement that the static fields be initialized prior
> to deserializing? If so, how can this be ensured? I am not 100% familiar
> with the details of this. I will review documentation but I'd like to know
> how this can be used properly.
>
> thanks

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic