Skip to content

Commit

Permalink
CDPD-35149. HADOOP-17947. Provide alternative to Guava VisibleForTest…
Browse files Browse the repository at this point in the history
…ing (apache#3505)

This includes both the asf commits for this

5b1d594 - HADOOP-17947. Provide alternative to Guava VisibleForTesting (apache#3505)
783e480 - HADOOP-17947. Additional element types for VisibleForTesting (ADDENDUM) (apache#3521)

Reviewed-by: Steve Loughran <stevel@apache.org>
Signed-off-by: Takanobu Asanuma <tasanuma@apache.org>
(cherry picked from commit 5b1d594)

(cherry picked from commit 4554833)
(cherry picked from commit 1af94fee55275f0c3c44639b0fa891e5c3e20675)
Signed-off-by: Arpit Agarwal <aagarwal@cloudera.com>

Change-Id: Ice45ed9b1a2988152e041c9063c4a68da9f18f88
  • Loading branch information
virajjasani authored and arp7 committed May 4, 2022
1 parent 6679032 commit e32d51a
Showing 1 changed file with 43 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* 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.hadoop.classification;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Annotates a program element that exists, or is more widely visible than
* otherwise necessary, specifically for use in test code.
* More precisely <i>test code within the hadoop-* modules</i>.
* Moreover, this gives the implicit scope and stability of:
* <pre>
* {@link InterfaceAudience.Private}
* {@link InterfaceStability.Unstable}
* </pre>
* If external modules need to access/override these methods, then
* they MUST be re-scoped as public/limited private.
*/
@Retention(RetentionPolicy.CLASS)
@Target({ ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR })
@Documented
public @interface VisibleForTesting {
}

0 comments on commit e32d51a

Please sign in to comment.