Skip to content

Commit

Permalink
Remove final so that J2KT can generate overrides in subclasses.
Browse files Browse the repository at this point in the history
Those overrides let J2KT resolve the conflict between the `default` methods on the interfaces and the methods inherited from the superclass.

RELNOTES=n/a
PiperOrigin-RevId: 597850278
  • Loading branch information
cpovirk authored and Google Java Core Libraries committed Jan 12, 2024
1 parent eccc0f6 commit 0824e6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions guava/src/com/google/common/collect/CollectSpliterators.java
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ OutSpliteratorT newFlatMapSpliterator(
*/

@Override
public final boolean tryAdvance(Consumer<? super OutElementT> action) {
public /*non-final for J2KT*/ boolean tryAdvance(Consumer<? super OutElementT> action) {
while (true) {
if (prefix != null && prefix.tryAdvance(action)) {
if (estimatedSize != Long.MAX_VALUE) {
Expand All @@ -366,7 +366,7 @@ public final boolean tryAdvance(Consumer<? super OutElementT> action) {
}

@Override
public final void forEachRemaining(Consumer<? super OutElementT> action) {
public /*non-final for J2KT*/ void forEachRemaining(Consumer<? super OutElementT> action) {
if (prefix != null) {
prefix.forEachRemaining(action);
prefix = null;
Expand Down

0 comments on commit 0824e6e

Please sign in to comment.