Skip to content

Make AbstractRowsEventDataDeserializer methods protected #105

@rhauch

Description

@rhauch

Most of the AbstractRowsEventDataDeserializer methods are private, which makes them impossible to override without overriding the deserializeRow(...) method and duplicating all of the logic in the class. Please make the methods protected and change the return type of most of the methods called in deserializeCell(...) to Serializable.

My project that is using the MySQL Binlog Connector library is using Java 8, and I'd like my project to override many of the date- and time-related methods. For example, the rather than the deserializeDate method return a java.sql.Date and use Calendar to assume the current time zone and convert the MySQL value into a java.sql.Date, I would much rather create a java.time.LocalDate object that is semantically identical to the MySQL value, and then deal with that LocalDate object later on in my code. This currently is not possible since the methods are private, but would be possible if the deserializeDate method were changed to protected and its signature is defined to return a Serializable rather than java.util.Date.

I plan to submit a pull request with the proposed changes. If I do this very soon, would you consider releasing a patch to 0.3.1?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions