Skip to content

Commit

Permalink
Build in CI using JDK 17 (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
philipp94831 authored Jan 30, 2024
1 parent 12f9100 commit 5d60994
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 22 deletions.
2 changes: 2 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ resources:

jobs:
- template: azure/gradle/build.yml@templates
parameters:
jdkVersion: '1.17'
- template: azure/gradle/create_tag_version.yml@templates
- template: azure/gradle/upload_release.yml@templates
- template: azure/gradle/upload_snapshot.yml@templates
16 changes: 14 additions & 2 deletions src/main/java/com/bakdata/util/seq2/BaseSeq.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c), 2023 bakdata GmbH
* Copyright (c), 2024 bakdata GmbH
* Licensed 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
Expand All @@ -22,7 +22,9 @@
import java.util.Optional;
import java.util.OptionalLong;
import java.util.Set;
import java.util.Spliterator;
import java.util.function.BiFunction;
import java.util.function.Consumer;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.function.Supplier;
Expand All @@ -34,7 +36,7 @@
import org.jooq.lambda.Seq;
import org.jooq.lambda.exception.TooManyElementsException;

public interface BaseSeq<T> {
public interface BaseSeq<T> extends Iterable<T>, Stream<T> {
/**
* @see Seq#avg()
*/
Expand Down Expand Up @@ -295,6 +297,11 @@ default <U> U foldRight(final U seed, final BiFunction<? super T, ? super U, ? e
return this.toSeq().foldRight(seed, function);
}

@Override
default void forEach(final Consumer<? super T> action) {
this.toSeq().forEach(action);
}

/**
* @see Seq#format()
*/
Expand Down Expand Up @@ -535,6 +542,11 @@ default void printOut() {
this.toSeq().printOut();
}

@Override
default Spliterator<T> spliterator() {
return this.toSeq().spliterator();
}

/**
* @see Seq#sum()
*/
Expand Down
11 changes: 3 additions & 8 deletions src/main/java/com/bakdata/util/seq2/PairSeq.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c), 2023 bakdata GmbH
* Copyright (c), 2024 bakdata GmbH
* Licensed 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
Expand Down Expand Up @@ -47,7 +47,7 @@
import org.jooq.lambda.tuple.Tuple2;

@SuppressWarnings("deprecation")
public interface PairSeq<K, V> extends Stream<Tuple2<K, V>>, Iterable<Tuple2<K, V>>, BaseSeq<Tuple2<K, V>> {
public interface PairSeq<K, V> extends BaseSeq<Tuple2<K, V>> {
/**
* @see Seq#empty()
*/
Expand Down Expand Up @@ -1044,7 +1044,7 @@ default <R> Seq2<R> flatMapToOptional(
@Override
@Deprecated
default void forEach(final Consumer<? super Tuple2<K, V>> action) {
this.toSeq2().forEach(action);
BaseSeq.super.forEach(action);
}

/**
Expand Down Expand Up @@ -2494,11 +2494,6 @@ default Tuple2<Optional<Tuple2<K, V>>, PairSeq<K, V>> splitAtHead() {
return this.toSeq2().splitAtHead().map2(PairSeq::seq);
}

@Override
default Spliterator<Tuple2<K, V>> spliterator() {
return this.toSeq2().spliterator();
}

/**
* @deprecated Use {@link #sum(BiFunction)}
*/
Expand Down
14 changes: 2 additions & 12 deletions src/main/java/com/bakdata/util/seq2/Seq2.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c), 2023 bakdata GmbH
* Copyright (c), 2024 bakdata GmbH
* Licensed 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
Expand Down Expand Up @@ -42,7 +42,7 @@
import org.jooq.lambda.tuple.Tuple2;

@SuppressWarnings("deprecation")
public interface Seq2<T> extends Stream<T>, Iterable<T>, BaseSeq<T> {
public interface Seq2<T> extends BaseSeq<T> {
/**
* @see Seq#empty()
*/
Expand Down Expand Up @@ -487,11 +487,6 @@ default <K, V> PairSeq<K, V> flatMapToIterablePair(
return this.flatMapToPair(t -> seq(mapper.apply(t)));
}

@Override
default void forEach(final Consumer<? super T> action) {
this.toSeq().forEach(action);
}

@Override
default void forEachOrdered(final Consumer<? super T> action) {
this.toSeq().forEachOrdered(action);
Expand Down Expand Up @@ -1174,11 +1169,6 @@ default Tuple2<Optional<T>, Seq2<T>> splitAtHead() {
return this.toSeq().splitAtHead().map2(Seq2::seq);
}

@Override
default Spliterator<T> spliterator() {
return this.toSeq().spliterator();
}

/**
* @see Seq#take(long)
*/
Expand Down

0 comments on commit 5d60994

Please sign in to comment.