Skip to content

Commit

Permalink
Remove @DonotCall from FluentIterable.from(FluentIterable).
Browse files Browse the repository at this point in the history
RELNOTES=n/a

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=314570253
  • Loading branch information
kluever authored and netdpb committed Jun 4, 2020
1 parent 592202a commit eee079f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public void testFrom() {
Lists.newArrayList(FluentIterable.from(ImmutableList.of(1, 2, 3, 4))));
}

@SuppressWarnings({"deprecation", "DoNotCall"}) // test of deprecated method
@SuppressWarnings("deprecation") // test of deprecated method
public void testFrom_alreadyFluentIterable() {
FluentIterable<Integer> iterable = FluentIterable.from(asList(1));
assertSame(iterable, FluentIterable.from(iterable));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import com.google.common.base.Optional;
import com.google.common.base.Predicate;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import com.google.errorprone.annotations.DoNotCall;
import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
Expand Down Expand Up @@ -174,7 +173,6 @@ public static <E> FluentIterable<E> from(E[] elements) {
* FluentIterable}
*/
@Deprecated
@DoNotCall("instances of FluentIterable don't need to be converted to a FluentIterable")
public static <E> FluentIterable<E> from(FluentIterable<E> iterable) {
return checkNotNull(iterable);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public void testFrom() {
Lists.newArrayList(FluentIterable.from(ImmutableList.of(1, 2, 3, 4))));
}

@SuppressWarnings({"deprecation", "DoNotCall"}) // test of deprecated method
@SuppressWarnings("deprecation") // test of deprecated method
public void testFrom_alreadyFluentIterable() {
FluentIterable<Integer> iterable = FluentIterable.from(asList(1));
assertSame(iterable, FluentIterable.from(iterable));
Expand Down
2 changes: 0 additions & 2 deletions guava/src/com/google/common/collect/FluentIterable.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import com.google.common.base.Optional;
import com.google.common.base.Predicate;
import com.google.errorprone.annotations.CanIgnoreReturnValue;
import com.google.errorprone.annotations.DoNotCall;
import java.util.Arrays;
import java.util.Collection;
import java.util.Comparator;
Expand Down Expand Up @@ -171,7 +170,6 @@ public static <E> FluentIterable<E> from(E[] elements) {
* FluentIterable}
*/
@Deprecated
@DoNotCall("instances of FluentIterable don't need to be converted to a FluentIterable")
public static <E> FluentIterable<E> from(FluentIterable<E> iterable) {
return checkNotNull(iterable);
}
Expand Down

0 comments on commit eee079f

Please sign in to comment.