TisonKun 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_r325044761
 
 

 ##########
 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 fallbackKeys != EMPTY;
 
 Review comment:
   What if we just delegate it to `hasFallbackKeys`? Concretely
   
   ```java
   /**
     * @deprecated Replaced by {@link #hasFallbackKeys()}
     */
   @Deprecated
   public boolean hasDeprecatedKeys() {
     return hasFallbackKeys();
   }
   ```
   
   I think it would not cause compile error when you bump the version and it is 
better that we keep code deprecated like deprecated code.

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