Skip to content

Commit

Permalink
Fix a class cast bug: TupleTagList is not a collection. (#12183)
Browse files Browse the repository at this point in the history
* Fix a class cast bug: TupleTagList is not a collection.

* Remove unused imports.

* Code changes after running spotless apply.
  • Loading branch information
lastomato committed Jul 7, 2020
1 parent d141981 commit 7ea4a69
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import com.google.auto.value.AutoValue;
import java.io.IOException;
import java.text.ParseException;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -275,9 +274,7 @@ public static class Result implements POutput, PInput {
PCollectionTuple pct;

public static Result of(PCollectionTuple pct) throws IllegalArgumentException {
if (pct.getAll()
.keySet()
.containsAll((Collection<?>) TupleTagList.of(OUT).and(DEAD_LETTER))) {
if (pct.getAll().keySet().containsAll(TupleTagList.of(OUT).and(DEAD_LETTER).getAll())) {
return new Result(pct);
} else {
throw new IllegalArgumentException(
Expand Down

0 comments on commit 7ea4a69

Please sign in to comment.