You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Chesnay Schepler (Jira)" <ji...@apache.org> on 2022/07/21 13:45:00 UTC

[jira] [Created] (FLINK-28636) Add utility to test POJO compliance

Chesnay Schepler created FLINK-28636:
----------------------------------------

             Summary: Add utility to test POJO compliance
                 Key: FLINK-28636
                 URL: https://issues.apache.org/jira/browse/FLINK-28636
             Project: Flink
          Issue Type: Improvement
          Components: API / DataStream, Tests
            Reporter: Chesnay Schepler
            Assignee: Chesnay Schepler
             Fix For: 1.16.0


Users should be encouraged to eagerly verify that their POJOs satisfy all the requirements that Flink imposes, however we provide no convenient way to test that.

They currently have to resort to something like below, which isn't obvious at all:
{code:java}
TypeSerializer<Event> eventSerializer =
            TypeInformation.of(Event.class).createSerializer(new ExecutionConfig()); assertThat(eventSerializer).isInstanceOf(PojoSerializer.class);{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)