Skip to content

Commit

Permalink
[FLINK-4435] Replace Guava's VisibleForTesting annotation with Flink'…
Browse files Browse the repository at this point in the history
…s annotation

This closes apache#2404
  • Loading branch information
wuchong authored and StephanEwen committed Aug 23, 2016
1 parent 1619e01 commit 863dc18
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
*/
package org.apache.flink.streaming.api.windowing.evictors;

import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.Iterables;
import org.apache.flink.annotation.PublicEvolving;
import org.apache.flink.annotation.VisibleForTesting;
import org.apache.flink.streaming.api.windowing.time.Time;
import org.apache.flink.streaming.api.windowing.windows.Window;
import org.apache.flink.streaming.runtime.streamrecord.StreamRecord;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@

package org.apache.flink.streaming.api.windowing.triggers;

import com.google.common.annotations.VisibleForTesting;

import org.apache.flink.annotation.PublicEvolving;
import org.apache.flink.annotation.VisibleForTesting;
import org.apache.flink.api.common.functions.ReduceFunction;
import org.apache.flink.api.common.state.ReducingState;
import org.apache.flink.api.common.state.ReducingStateDescriptor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@

package org.apache.flink.streaming.api.windowing.triggers;

import com.google.common.annotations.VisibleForTesting;

import org.apache.flink.annotation.PublicEvolving;
import org.apache.flink.annotation.VisibleForTesting;
import org.apache.flink.api.common.functions.ReduceFunction;
import org.apache.flink.api.common.state.ReducingState;
import org.apache.flink.api.common.state.ReducingStateDescriptor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
*/
package org.apache.flink.streaming.api.windowing.triggers;

import com.google.common.annotations.VisibleForTesting;
import org.apache.flink.annotation.PublicEvolving;
import org.apache.flink.annotation.VisibleForTesting;
import org.apache.flink.streaming.api.windowing.windows.Window;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
*/
package org.apache.flink.streaming.runtime.operators.windowing;

import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Function;
import com.google.common.collect.FluentIterable;
import com.google.common.collect.Iterables;
import org.apache.flink.annotation.Internal;
import org.apache.flink.annotation.VisibleForTesting;
import org.apache.flink.api.common.state.ListState;
import org.apache.flink.api.common.state.AppendingState;
import org.apache.flink.api.common.state.MergingState;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@

package org.apache.flink.streaming.runtime.operators.windowing;

import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.HashMultiset;
import com.google.common.collect.Multiset;
import org.apache.flink.annotation.Internal;
import org.apache.flink.annotation.VisibleForTesting;
import org.apache.flink.api.common.ExecutionConfig;
import org.apache.flink.api.common.state.AppendingState;
import org.apache.flink.api.common.state.ListState;
Expand Down
6 changes: 6 additions & 0 deletions tools/maven/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,12 @@ under the License.
<property name="illegalPattern" value="true"/>
<property name="message" value="Use Flink's Preconditions instead of Guava's Preconditions"/>
</module>
<!-- forbid the use of com.google.common.annotations.VisibleForTesting -->
<module name="Regexp">
<property name="format" value="import com\.google\.common\.annotations\.VisibleForTesting"/>
<property name="illegalPattern" value="true"/>
<property name="message" value="Use Flink's VisibleForTesting instead of Guava's VisibleForTesting"/>
</module>
<module name="Regexp">
<property name="format" value="import static com\.google\.common\.base\.Preconditions"/>
<property name="illegalPattern" value="true"/>
Expand Down

0 comments on commit 863dc18

Please sign in to comment.