[
https://issues.apache.org/jira/browse/FLINK-34259?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17812299#comment-17812299
]
Jiabao Sun commented on FLINK-34259:
------------------------------------
[~martijnvisser] But I still have a question. In the previous changes by
[FLINK-34090], there was no change in the compatibility of the public
interface. Normally, when creating an ExecutionConfig object through the
constructor of ExecutionConfig, a SerializerConfig object is also created, so
the issue of NPE being thrown by hasGenericTypesDisabled should not occur. The
NPE exception thrown in the JDBC connector test is mainly because the
ExecutionConfig is mocked using Mockito, so
serializerConfig.hasGenericTypesDisabled() will throw NPE. I'm not sure if this
qualifies as breaking the public interface.
> flink-connector-jdbc fails to compile with NPE on hasGenericTypesDisabled
> -------------------------------------------------------------------------
>
> Key: FLINK-34259
> URL: https://issues.apache.org/jira/browse/FLINK-34259
> Project: Flink
> Issue Type: Bug
> Components: Connectors / JDBC
> Reporter: Martijn Visser
> Priority: Blocker
> Labels: pull-request-available
> Fix For: 1.19.0
>
>
> https://github.com/apache/flink-connector-jdbc/actions/runs/7682035724/job/20935884874#step:14:150
> {code:java}
> Error: Tests run: 10, Failures: 5, Errors: 4, Skipped: 0, Time elapsed:
> 7.909 s <<< FAILURE! - in
> org.apache.flink.connector.jdbc.JdbcRowOutputFormatTest
> Error:
> org.apache.flink.connector.jdbc.JdbcRowOutputFormatTest.testInvalidConnectionInJdbcOutputFormat
> Time elapsed: 3.254 s <<< ERROR!
> java.lang.NullPointerException: Cannot invoke
> "org.apache.flink.api.common.serialization.SerializerConfig.hasGenericTypesDisabled()"
> because "config" is null
> at
> org.apache.flink.api.java.typeutils.GenericTypeInfo.createSerializer(GenericTypeInfo.java:85)
> at
> org.apache.flink.api.java.typeutils.GenericTypeInfo.createSerializer(GenericTypeInfo.java:99)
> at
> org.apache.flink.connector.jdbc.JdbcTestBase.getSerializer(JdbcTestBase.java:70)
> at
> org.apache.flink.connector.jdbc.JdbcRowOutputFormatTest.testInvalidConnectionInJdbcOutputFormat(JdbcRowOutputFormatTest.java:336)
> at java.base/java.lang.reflect.Method.invoke(Method.java:568)
> at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
> at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
> {code}
> Seems to be caused by FLINK-34122
--
This message was sent by Atlassian Jira
(v8.20.10#820010)