yanghua 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_r325234755
 
 

 ##########
 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:
   I think you are right. Additionally, we may also need to change the 
implementation of the`hasDeprecatedKeys` method, right? Only based on the 
`fallbackKeys != EMPTY` condition, can not judge a config option has deprecated 
keys if the fallback key is not marked as deprecated.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to