jinmeiliao commented on a change in pull request #5680:
URL: https://github.com/apache/geode/pull/5680#discussion_r521657109



##########
File path: 
geode-common/src/main/java/org/apache/geode/annotations/internal/SuppressDeprecationForBackwardsCompatibilityTesting.java
##########
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more 
contributor license
+ * agreements. See the NOTICE file distributed with this work for additional 
information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache 
License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the 
License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software 
distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 
KIND, either express
+ * or implied. See the License for the specific language governing permissions 
and limitations under
+ * the License.
+ */
+
+package org.apache.geode.annotations.internal;
+
+import static java.lang.annotation.ElementType.CONSTRUCTOR;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.PACKAGE;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.ElementType.TYPE;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * Indicates suppression of deprecation warning because the element is 
required for backwards
+ * compatibility testing. The element being suppressed should have a
+ * {@link DeprecatedButRequiredForBackwardsCompatibilityTesting} annotation.
+ *
+ * Should be paired with {@link SuppressWarnings}("deprecation") to actually 
suppress warning.
+ */
+@Documented
+@Retention(RetentionPolicy.SOURCE)
+@Target(value = {CONSTRUCTOR, FIELD, LOCAL_VARIABLE, METHOD, PACKAGE, 
PARAMETER, TYPE})
+public @interface SuppressDeprecationForBackwardsCompatibilityTesting {

Review comment:
       i wonder if we can get rid of this annotation by just not using the 
deprecated method in the tests. I searched for the usage, there are only two 
places that uses `SocketCreator.getLocalhost`




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


Reply via email to