tillrohrmann commented on a change in pull request #9691: [FLINK-13965] Keep 
hasDeprecatedKeys and deprecatedKeys methods in ConfigOption and mark it with 
@Deprecated annotation
URL: https://github.com/apache/flink/pull/9691#discussion_r325187914
 
 

 ##########
 File path: 
flink-core/src/main/java/org/apache/flink/configuration/ConfigOption.java
 ##########
 @@ -195,6 +196,27 @@ public T defaultValue() {
                return defaultValue;
        }
 
+       /**
+        * Checks whether this option has deprecated keys.
+        * @return True if the option has deprecated keys, false if not.
+        * @deprecated Replaced by {@link #hasFallbackKeys()}
+        */
+       @Deprecated
+       public boolean hasDeprecatedKeys() {
+               return hasFallbackKeys();
+       }
+
+       /**
+        * Gets the deprecated keys, in the order to be checked.
+        * @return The option's deprecated keys.
+        * @deprecated Replaced by {@link #fallbackKeys()}
+        */
+       @Deprecated
+       public Iterable<String> deprecatedKeys() {
+               return fallbackKeys == EMPTY ? Collections.<String>emptyList() :
+                       Arrays.stream(fallbackKeys).map(fallbackKey -> 
fallbackKey.getKey()).collect(Collectors.toList());
 
 Review comment:
   ```suggestion
                        Arrays.stream(fallbackKeys)
                            .filter(FallbackKey::isDeprecated)
                            .map(FallbackKey::getKey)
                            .collect(Collectors.toList());
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to