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

ASF GitHub Bot commented on FLINK-6608:
---------------------------------------

Github user sunjincheng121 commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3928#discussion_r117142993
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/security/SecurityUtils.java
 ---
    @@ -230,10 +231,21 @@ private void validate() {
                }
     
                private static List<String> parseList(String value) {
    -                   if(value == null) {
    +                   if(value == null || value.isEmpty()) {
                                return Collections.emptyList();
                        }
    -                   return Arrays.asList(value.split(","));
    --- End diff --
    
    @EronWright your suggestion will be work. But I'd like using regular 
expression. The JDK DOC also has the same recommend:
     `StringTokenizer is a legacy class that is retained for compatibility 
reasons although its use is discouraged in new code. It is recommended that 
anyone seeking this functionality use the split method of String or the 
java.util.regex package instead.`
    Please see: 
http://docs.oracle.com/javase/7/docs/api/java/util/StringTokenizer.html
    What do you think ? @EronWright @tzulitai 
    Best,
    SunJincheng



> Relax Kerberos login contexts parsing by trimming whitespaces in contexts list
> ------------------------------------------------------------------------------
>
>                 Key: FLINK-6608
>                 URL: https://issues.apache.org/jira/browse/FLINK-6608
>             Project: Flink
>          Issue Type: Improvement
>          Components: Configuration, Security
>            Reporter: Tzu-Li (Gordon) Tai
>            Assignee: Tzu-Li (Gordon) Tai
>            Priority: Minor
>             Fix For: 1.3.0, 1.4.0
>
>
> The Kerberos login contexts list parsing right now isn't quite user-friendly.
> The list must be provided as: {{security.kerberos.login.contexts: 
> Client,KafkaClient}}, without any whitespace in between.
> We can relax this to be more user-friendly by trimming any whitespaces in the 
> list.
> A user actually stumbled across this: 
> http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Problems-with-Kerberos-Kafka-connection-in-version-1-2-0-td12580.html#a12589



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to