diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index ccebba7..033e24c 100644 --- a/gradle/wrapper/gradle-wrapper.jar +++ b/gradle/wrapper/gradle-wrapper.jar Binary files differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index bdc9a83..9f4197d 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,7 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip networkTimeout=10000 +validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 79a61d4..fcb6fca 100755 --- a/gradlew +++ b/gradlew @@ -85,9 +85,6 @@ APP_BASE_NAME=${0##*/} APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' - # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD=maximum @@ -133,10 +130,13 @@ fi else JAVACMD=java - which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + if ! command -v java >/dev/null 2>&1 + then + die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the location of your Java installation." + fi fi # Increase the maximum file descriptors if we can. @@ -197,6 +197,10 @@ done fi + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Collect all arguments for the java command; # * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of # shell script including quotes and variable substitutions, so put them in diff --git a/src/main/java/com/github/tonivade/vavr/effect/IO.java b/src/main/java/com/github/tonivade/vavr/effect/IO.java index 42d9f98..64f59e1 100644 --- a/src/main/java/com/github/tonivade/vavr/effect/IO.java +++ b/src/main/java/com/github/tonivade/vavr/effect/IO.java @@ -5,6 +5,7 @@ package com.github.tonivade.vavr.effect; import static io.vavr.Function1.identity; + import java.time.Duration; import java.util.ArrayDeque; import java.util.Deque; @@ -22,6 +23,7 @@ import java.util.function.Predicate; import java.util.function.Supplier; import java.util.function.UnaryOperator; + import io.vavr.CheckedConsumer; import io.vavr.CheckedFunction0; import io.vavr.CheckedRunnable; diff --git a/src/main/java/com/github/tonivade/vavr/effect/Resource.java b/src/main/java/com/github/tonivade/vavr/effect/Resource.java index 78d1027..0c81b47 100644 --- a/src/main/java/com/github/tonivade/vavr/effect/Resource.java +++ b/src/main/java/com/github/tonivade/vavr/effect/Resource.java @@ -5,6 +5,7 @@ package com.github.tonivade.vavr.effect; import java.util.Objects; + import io.vavr.CheckedConsumer; import io.vavr.Function1; import io.vavr.Tuple; @@ -22,7 +23,7 @@ return flatMap(t -> pure(mapper.andThen(IO::pure).apply(t))); } - public Resource flatMap(Function1> mapper) { + public Resource flatMap(Function1> mapper) { return new Resource<>(managed.flatMap( t -> { Resource apply = mapper.apply(t._1());