flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mingleizhang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-8824) In Kafka Consumers, replace 'getCanonicalName()' with 'getClassName()'
Date Fri, 02 Mar 2018 12:25:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-8824?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16383535#comment-16383535
] 

mingleizhang commented on FLINK-8824:
-------------------------------------

Hi, [~StephanEwen] The only problematic seems I can get like the following. Other than that,
I think all good.


{code:java}
//inner class
System.out.println(HashMap.SimpleEntry.class.getName());
System.out.println(HashMap.SimpleEntry.class.getCanonicalName());
{code}

Will print as follows


{code:java}
java.util.AbstractMap$SimpleEntry // correct way
java.util.AbstractMap.SimpleEntry // wrong way
{code}








 

> In Kafka Consumers, replace 'getCanonicalName()' with 'getClassName()'
> ----------------------------------------------------------------------
>
>                 Key: FLINK-8824
>                 URL: https://issues.apache.org/jira/browse/FLINK-8824
>             Project: Flink
>          Issue Type: Bug
>          Components: Kafka Connector
>            Reporter: Stephan Ewen
>            Assignee: mingleizhang
>            Priority: Major
>             Fix For: 1.5.0
>
>
> The connector uses {{getCanonicalName()}} in all places, gather than {{getClassName()}}.
> {{getCanonicalName()}}'s intention is to normalize class names for arrays, etc, but is
problematic when instantiating classes from class names.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message