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

    https://github.com/apache/flink/pull/5346#discussion_r163495632
  
    --- Diff: 
flink-mesos/src/main/java/org/apache/flink/mesos/runtime/clusterframework/MesosTaskManagerParameters.java
 ---
    @@ -365,6 +386,31 @@ public String call(String s) {
                }
        }
     
    +   public static List<Protos.Parameter> 
buildDockerParameters(Option<String> dockerParameters) {
    +           if (dockerParameters.isEmpty()) {
    +                   return Collections.emptyList();
    +           } else {
    +                   String[] dockerParameterSpecifications = 
dockerParameters.get().split(",");
    +
    +                   List<Protos.Parameter> parameters = new 
ArrayList<>(dockerParameterSpecifications.length);
    +
    +                   for (String dockerParameterSpecification : 
dockerParameterSpecifications) {
    +                           if 
(!dockerParameterSpecification.trim().isEmpty()) {
    +                                   String[] match = 
dockerParameterSpecification.split("=", 2);
    --- End diff --
    
    I would use split without the limit, i.e., .split("=")
    1. You already test for length below
    2. this way you would miss invalid specifications such as key2=val1=val3


---

Reply via email to