From bf41bb6ea9b97e2c919c8887202e6adcb467addf Mon Sep 17 00:00:00 2001 From: "Danielewski, Dariusz" Date: Wed, 30 Dec 2020 01:14:48 -0500 Subject: [PATCH 01/10] Added pom files, updated Lombok decorator --- .java-version | 2 +- build.gradle | 3 +++ .../cyclops/react/collectors/lazy/BatchingCollector.java | 6 +++--- .../com/oath/cyclops/react/collectors/lazy/MaxActive.java | 6 +++--- .../cyclops/react/collectors/lazy/SamplingCollector.java | 6 +++--- .../src/main/java/cyclops/futurestream/LazyReact.java | 7 ++++--- 6 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.java-version b/.java-version index d7ffb667a0..2ab5505161 100644 --- a/.java-version +++ b/.java-version @@ -1 +1 @@ -1.8.0.181 +1.8.0.251 diff --git a/build.gradle b/build.gradle index 51f4efe0a6..26db51fa5f 100644 --- a/build.gradle +++ b/build.gradle @@ -12,6 +12,9 @@ plugins { id 'me.champeau.gradle.jmh' version '0.2.0' } +apply plugin: 'java' +apply plugin: 'maven' + def custom = { "$rootDir/gradle/${it}.gradle" } //find custom plugins locally diff --git a/cyclops-futurestream/src/main/java/com/oath/cyclops/react/collectors/lazy/BatchingCollector.java b/cyclops-futurestream/src/main/java/com/oath/cyclops/react/collectors/lazy/BatchingCollector.java index 1165334b01..4e4e791cf1 100644 --- a/cyclops-futurestream/src/main/java/com/oath/cyclops/react/collectors/lazy/BatchingCollector.java +++ b/cyclops-futurestream/src/main/java/com/oath/cyclops/react/collectors/lazy/BatchingCollector.java @@ -11,8 +11,8 @@ import lombok.AllArgsConstructor; import lombok.Getter; -import lombok.experimental.Builder; -import lombok.experimental.Wither; +import lombok.With; +import lombok.Builder; /** * This class allows a Batch of completable futures to be processed before collecting their results, to increase @@ -22,7 +22,7 @@ * * @param Result type */ -@Wither +@With @AllArgsConstructor @Builder public class BatchingCollector implements LazyResultConsumer { diff --git a/cyclops-futurestream/src/main/java/com/oath/cyclops/react/collectors/lazy/MaxActive.java b/cyclops-futurestream/src/main/java/com/oath/cyclops/react/collectors/lazy/MaxActive.java index 3178dc7ead..d327392e66 100644 --- a/cyclops-futurestream/src/main/java/com/oath/cyclops/react/collectors/lazy/MaxActive.java +++ b/cyclops-futurestream/src/main/java/com/oath/cyclops/react/collectors/lazy/MaxActive.java @@ -2,12 +2,12 @@ import lombok.AllArgsConstructor; import lombok.Getter; -import lombok.experimental.Builder; -import lombok.experimental.Wither; +import lombok.With; +import lombok.Builder; @AllArgsConstructor @Getter -@Wither +@With @Builder public class MaxActive { diff --git a/cyclops-futurestream/src/main/java/com/oath/cyclops/react/collectors/lazy/SamplingCollector.java b/cyclops-futurestream/src/main/java/com/oath/cyclops/react/collectors/lazy/SamplingCollector.java index af2a80b7d9..699e70cfef 100644 --- a/cyclops-futurestream/src/main/java/com/oath/cyclops/react/collectors/lazy/SamplingCollector.java +++ b/cyclops-futurestream/src/main/java/com/oath/cyclops/react/collectors/lazy/SamplingCollector.java @@ -6,8 +6,8 @@ import com.oath.cyclops.internal.react.async.future.FastFuture; import lombok.AllArgsConstructor; -import lombok.experimental.Builder; -import lombok.experimental.Wither; +import lombok.With; +import lombok.Builder; /** * @@ -19,7 +19,7 @@ * @param Result type */ @AllArgsConstructor -@Wither +@With @Builder public class SamplingCollector implements LazyResultConsumer { diff --git a/cyclops-futurestream/src/main/java/cyclops/futurestream/LazyReact.java b/cyclops-futurestream/src/main/java/cyclops/futurestream/LazyReact.java index 8e0d8c9188..e22dfb545f 100644 --- a/cyclops-futurestream/src/main/java/cyclops/futurestream/LazyReact.java +++ b/cyclops-futurestream/src/main/java/cyclops/futurestream/LazyReact.java @@ -22,6 +22,7 @@ import cyclops.data.Seq; import cyclops.reactive.ReactiveSeq; import cyclops.reactive.Spouts; +import lombok.experimental.Wither; import org.reactivestreams.Publisher; import com.oath.cyclops.internal.react.FutureStreamImpl; @@ -35,8 +36,8 @@ import lombok.Getter; import lombok.ToString; -import lombok.experimental.Builder; -import lombok.experimental.Wither; +import lombok.Builder; +import lombok.With; /** * @@ -71,7 +72,7 @@ */ @Builder -@Wither +@With @ToString public class LazyReact implements ReactBuilder { From 1c1beb02440f16aaf6bbe7d10b0cb20856207f90 Mon Sep 17 00:00:00 2001 From: "Danielewski, Dariusz" Date: Wed, 30 Dec 2020 01:25:24 -0500 Subject: [PATCH 02/10] Missed pom files in prior commit --- cyclops-anym/pom.xml | 102 ++++++++++++++++++ cyclops-futurestream/pom.xml | 124 ++++++++++++++++++++++ cyclops-jackson-integration/pom.xml | 81 +++++++++++++++ cyclops-pure/pom.xml | 114 ++++++++++++++++++++ cyclops-reactive-collections/pom.xml | 124 ++++++++++++++++++++++ cyclops-reactor-integration/pom.xml | 129 +++++++++++++++++++++++ cyclops-rxjava2-integration/pom.xml | 129 +++++++++++++++++++++++ cyclops/pom.xml | 150 +++++++++++++++++++++++++++ pom.xml | 60 +++++++++++ 9 files changed, 1013 insertions(+) create mode 100644 cyclops-anym/pom.xml create mode 100644 cyclops-futurestream/pom.xml create mode 100644 cyclops-jackson-integration/pom.xml create mode 100644 cyclops-pure/pom.xml create mode 100644 cyclops-reactive-collections/pom.xml create mode 100644 cyclops-reactor-integration/pom.xml create mode 100644 cyclops-rxjava2-integration/pom.xml create mode 100644 cyclops/pom.xml create mode 100644 pom.xml diff --git a/cyclops-anym/pom.xml b/cyclops-anym/pom.xml new file mode 100644 index 0000000000..f421c41344 --- /dev/null +++ b/cyclops-anym/pom.xml @@ -0,0 +1,102 @@ + + + + com.oath.cyclops + com.oath.cyclops + 10.4.0 + + 4.0.0 + com.oath.cyclops + cyclops-anym + 10.4.0 + cyclops-anym + A higher kinded monad abstraction for Java + https://github.com/aol/cyclops-react + 2015 + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + johnmcclean + John McClean + john.mcclean@oath.com + + + kewangie + Ke Wang + ke.wang@teamaol.com + + + tkountis + Thomas Kountis Wang + thomas.kountis@adtech.com + + + colinfkennedy + Colin Kennedy + Colin.Kennedy@teamaol.com + + + + scm:git@github.com:aol/cyclops-react.git + scm:git@github.com:aol/simple-react.git + scm:git@github.com:aol/cyclops-react.git + + + + com.oath.cyclops + cyclops + 10.4.0 + compile + + + com.oath.cyclops + cyclops-futurestream + 10.4.0 + compile + + + com.oath.cyclops + cyclops-reactive-collections + 10.4.0 + compile + + + com.oath.cyclops + cyclops-pure + 10.4.0 + compile + + + io.projectreactor + reactor-core + 3.0.7.RELEASE + test + + + junit + junit + 4.12 + test + + + org.hamcrest + hamcrest-all + 1.3 + test + + + com.github.stefanbirkner + system-rules + 1.10.0 + test + + + diff --git a/cyclops-futurestream/pom.xml b/cyclops-futurestream/pom.xml new file mode 100644 index 0000000000..c8877e6321 --- /dev/null +++ b/cyclops-futurestream/pom.xml @@ -0,0 +1,124 @@ + + + + com.oath.cyclops + com.oath.cyclops + 10.4.0 + + 4.0.0 + com.oath.cyclops + cyclops-futurestream + 10.4.0 + cyclops-futurestream + Asynchronous parallel streaming via futures + https://github.com/aol/cyclops-react + 2015 + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + johnmcclean + John McClean + john.mcclean@oath.com + + + kewangie + Ke Wang + ke.wang@teamaol.com + + + tkountis + Thomas Kountis Wang + thomas.kountis@adtech.com + + + colinfkennedy + Colin Kennedy + Colin.Kennedy@teamaol.com + + + + scm:git@github.com:aol/cyclops-react.git + scm:git@github.com:aol/simple-react.git + scm:git@github.com:aol/cyclops-react.git + + + + com.oath.cyclops + cyclops + + + com.oath.cyclops + cyclops-reactive-collections + 10.4.0 + compile + + + org.reactivestreams + reactive-streams-tck + 1.0.0 + test + + + org.mockito + mockito-core + 1.9.5 + test + + + io.projectreactor + reactor-core + 3.0.7.RELEASE + test + + + org.hamcrest + hamcrest-all + 1.3 + test + + + junit + junit + 4.12 + test + + + org.testng + testng + 5.14.10 + test + + + com.github.stefanbirkner + system-rules + 1.10.0 + test + + + io.vertx + vertx-core + 3.0.0 + test + + + org.hibernate + hibernate-core + 5.1.0.Final + test + + + org.hibernate + hibernate-entitymanager + 5.1.0.Final + test + + + diff --git a/cyclops-jackson-integration/pom.xml b/cyclops-jackson-integration/pom.xml new file mode 100644 index 0000000000..b73d37a4c6 --- /dev/null +++ b/cyclops-jackson-integration/pom.xml @@ -0,0 +1,81 @@ + + + + com.oath.cyclops + com.oath.cyclops + 10.4.0 + + 4.0.0 + com.oath.cyclops + cyclops-jackson-integration + 10.4.0 + cyclops-jackson + Cyclops integration for Jackson + https://github.com/oath/cyclops + 2015 + + + The MIT License (MIT) + https://github.com/oath/cyclops/blob/master/licence.txt + repo + + + + + johnmcclean + John McClean + john.mcclean@oath.com + + + + ssh://git@github.com:aol/cyclops.git + ssh://git@github.com:aol/cyclops.git + ssh://git@github.com:aol/cyclops.git + + + + com.oath.cyclops + cyclops + 10.4.0 + compile + + + com.fasterxml.jackson.core + jackson-databind + 2.10.1 + compile + + + com.oath.cyclops + cyclops-reactive-collections + 10.4.0 + test + + + com.fasterxml.jackson.datatype + jackson-datatype-jdk8 + 2.10.1 + test + + + junit + junit + 4.12 + test + + + org.hamcrest + hamcrest-all + 1.3 + test + + + org.mockito + mockito-all + 1.9.5 + test + + + diff --git a/cyclops-pure/pom.xml b/cyclops-pure/pom.xml new file mode 100644 index 0000000000..51301d70bb --- /dev/null +++ b/cyclops-pure/pom.xml @@ -0,0 +1,114 @@ + + + + com.oath.cyclops + com.oath.cyclops + 10.4.0 + + 4.0.0 + com.oath.cyclops + cyclops-pure + 10.4.0 + cyclops-pure + Pure funcional programming for Java 8 and beyond + https://github.com/aol/cyclops-react + 2017 + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + johnmcclean + John McClean + john.mcclean@oath.com + + + kewangie + Ke Wang + ke.wang@teamaol.com + + + tkountis + Thomas Kountis Wang + thomas.kountis@adtech.com + + + colinfkennedy + Colin Kennedy + Colin.Kennedy@teamaol.com + + + + scm:git@github.com:aol/cyclops-react.git + scm:git@github.com:aol/simple-react.git + scm:git@github.com:aol/cyclops-react.git + + + + com.oath.cyclops + cyclops + 10.4.0 + compile + + + com.oath.cyclops + cyclops-reactive-collections + 10.4.0 + compile + + + org.reactivestreams + reactive-streams-tck + 1.0.0 + test + + + org.mockito + mockito-core + 1.9.5 + test + + + io.projectreactor + reactor-core + 3.0.7.RELEASE + test + + + org.hamcrest + hamcrest-all + 1.3 + test + + + junit + junit + 4.12 + test + + + org.testng + testng + 5.14.10 + test + + + com.github.stefanbirkner + system-rules + 1.10.0 + test + + + io.vertx + vertx-core + 3.0.0 + test + + + diff --git a/cyclops-reactive-collections/pom.xml b/cyclops-reactive-collections/pom.xml new file mode 100644 index 0000000000..7d740d150c --- /dev/null +++ b/cyclops-reactive-collections/pom.xml @@ -0,0 +1,124 @@ + + + + com.oath.cyclops + com.oath.cyclops + 10.4.0 + + 4.0.0 + com.oath.cyclops + cyclops-reactive-collections + 10.4.0 + cyclops-reactive-collections + Reactive collections + https://github.com/aol/cyclops-react + 2017 + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + johnmcclean + John McClean + john.mcclean@oath.com + + + kewangie + Ke Wang + ke.wang@teamaol.com + + + tkountis + Thomas Kountis Wang + thomas.kountis@adtech.com + + + colinfkennedy + Colin Kennedy + Colin.Kennedy@teamaol.com + + + + scm:git@github.com:aol/cyclops-react.git + scm:git@github.com:aol/simple-react.git + scm:git@github.com:aol/cyclops-react.git + + + + com.oath.cyclops + cyclops + + + org.reactivestreams + reactive-streams-tck + 1.0.0 + test + + + io.projectreactor + reactor-test + 3.2.2.RELEASE + test + + + org.mockito + mockito-core + 1.9.5 + test + + + io.projectreactor + reactor-core + 3.0.7.RELEASE + test + + + org.hamcrest + hamcrest-all + 1.3 + test + + + com.google.guava + guava + 19.0 + test + + + com.google.guava + guava-testlib + 19.0 + test + + + junit + junit + 4.12 + test + + + org.testng + testng + 5.14.10 + test + + + com.github.stefanbirkner + system-rules + 1.10.0 + test + + + io.vertx + vertx-core + 3.0.0 + test + + + diff --git a/cyclops-reactor-integration/pom.xml b/cyclops-reactor-integration/pom.xml new file mode 100644 index 0000000000..5e7ffcc33c --- /dev/null +++ b/cyclops-reactor-integration/pom.xml @@ -0,0 +1,129 @@ + + + + com.oath.cyclops + com.oath.cyclops + 10.4.0 + + 4.0.0 + com.oath.cyclops + cyclops-reactor-integration + 10.4.0 + cyclops-reactor + Cyclops integrations for Reactor + https://github.com/aol/cyclops + 2016 + + + The MIT License (MIT) + https://github.com/oath/cyclops/blob/master/licence.txt + repo + + + + + johnmcclean + John McClean + john.mcclean@oath.com + + + + ssh://git@github.com:aol/cyclops.git + ssh://git@github.com:aol/cyclops.git + ssh://git@github.com:aol/cyclops.git + + + + com.oath.cyclops + cyclops + 10.4.0 + compile + + + com.oath.cyclops + cyclops-pure + 10.4.0 + compile + + + com.oath.cyclops + cyclops-anym + 10.4.0 + compile + + + com.oath.cyclops + cyclops-futurestream + 10.4.0 + compile + + + com.oath.cyclops + cyclops-reactive-collections + 10.4.0 + compile + + + io.projectreactor + reactor-core + 3.3.1.RELEASE + compile + + + commons-io + commons-io + 2.4 + test + + + junit + junit + 4.12 + test + + + org.hamcrest + hamcrest-all + 1.3 + test + + + org.mockito + mockito-all + 1.9.5 + test + + + org.reactivestreams + reactive-streams-tck + 1.0.0 + test + + + org.assertj + assertj-core + 3.2.0 + test + + + com.github.stefanbirkner + system-rules + 1.10.0 + test + + + org.hibernate + hibernate-core + 5.1.0.Final + test + + + org.hibernate + hibernate-entitymanager + 5.1.0.Final + test + + + diff --git a/cyclops-rxjava2-integration/pom.xml b/cyclops-rxjava2-integration/pom.xml new file mode 100644 index 0000000000..84ae52946e --- /dev/null +++ b/cyclops-rxjava2-integration/pom.xml @@ -0,0 +1,129 @@ + + + + com.oath.cyclops + com.oath.cyclops + 10.4.0 + + 4.0.0 + com.oath.cyclops + cyclops-rx2-integration + 10.4.0 + cyclops-rxjava2 + Cyclops integration with RxJava 2 + https://github.com/oath/cyclops + 2017 + + + The MIT License (MIT) + https://github.com/aol/cyclops/blob/master/licence.txt + repo + + + + + johnmcclean + John McClean + john.mcclean@oath.com + + + + ssh://git@github.com:aol/cyclops.git + ssh://git@github.com:aol/cyclops.git + ssh://git@github.com:aol/cyclops.git + + + + com.oath.cyclops + cyclops + 10.4.0 + compile + + + com.oath.cyclops + cyclops-anym + 10.4.0 + compile + + + com.oath.cyclops + cyclops-futurestream + 10.4.0 + compile + + + com.oath.cyclops + cyclops-reactive-collections + 10.4.0 + compile + + + io.reactivex.rxjava2 + rxjava + 2.2.16 + compile + + + io.projectreactor + reactor-core + 3.3.1.RELEASE + test + + + commons-io + commons-io + 2.4 + test + + + junit + junit + 4.12 + test + + + org.hamcrest + hamcrest-all + 1.3 + test + + + org.mockito + mockito-all + 1.9.5 + test + + + org.reactivestreams + reactive-streams-tck + 1.0.0 + test + + + org.assertj + assertj-core + 3.2.0 + test + + + com.github.stefanbirkner + system-rules + 1.10.0 + test + + + org.hibernate + hibernate-core + 5.1.0.Final + test + + + org.hibernate + hibernate-entitymanager + 5.1.0.Final + test + + + diff --git a/cyclops/pom.xml b/cyclops/pom.xml new file mode 100644 index 0000000000..de30183270 --- /dev/null +++ b/cyclops/pom.xml @@ -0,0 +1,150 @@ + + + + com.oath.cyclops + com.oath.cyclops + 10.4.0 + + 4.0.0 + com.oath.cyclops + cyclops + 10.4.0 + cyclops + Platform for Functional Reactive Programming with Java 8 + https://github.com/aol/cyclops-react + 2015 + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + johnmcclean-aol + John McClean + john.mcclean@teamaol.com + + + kewangie + Ke Wang + ke.wang@teamaol.com + + + tkountis + Thomas Kountis Wang + thomas.kountis@adtech.com + + + colinfkennedy + Colin Kennedy + Colin.Kennedy@teamaol.com + + + + scm:git@github.com:aol/cyclops-react.git + scm:git@github.com:aol/simple-react.git + scm:git@github.com:aol/cyclops-react.git + + + + org.agrona + Agrona + 0.9.1 + compile + + + org.reactivestreams + reactive-streams + 1.0.0 + compile + + + io.kindedj + kindedj + 1.1.0 + compile + + + com.google.guava + guava + 19.0 + test + + + io.projectreactor + reactor-test + 3.2.2.RELEASE + test + + + com.github.stefanbirkner + system-rules + 1.10.0 + test + + + io.projectreactor + reactor-core + 3.2.2.RELEASE + test + + + org.reactivestreams + reactive-streams-tck + 1.0.0 + test + + + junit + junit + 4.12 + test + + + org.hamcrest + hamcrest-all + 1.3 + test + + + org.mockito + mockito-all + 1.9.5 + test + + + io.javaslang + javaslang + 2.0.2 + test + + + org.assertj + assertj-core + 3.8.0 + test + + + org.hibernate + hibernate-core + 5.1.0.Final + test + + + org.hibernate + hibernate-entitymanager + 5.1.0.Final + test + + + org.hsqldb + hsqldb + 2.0.0 + test + + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000000..7cdcb6b874 --- /dev/null +++ b/pom.xml @@ -0,0 +1,60 @@ + + + 4.0.0 + com.oath.cyclops + com.oath.cyclops + 10.4.0 + pom + + + cyclops + cyclops-anym + cyclops-futurestream + cyclops-jackson-integration + cyclops-pure + cyclops-reactive-collections + cyclops-reactor-integration + cyclops-rxjava2-integration + + + + UTF-8 + + + + + org.projectlombok + lombok + 1.18.16 + + + + + + + com.oath.cyclops + cyclops + 10.4.0 + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + 8 + 8 + + + + + + + From 01c778311a829b35f0d5b07349c3d87109835085 Mon Sep 17 00:00:00 2001 From: "Danielewski, Dariusz" Date: Wed, 30 Dec 2020 01:27:04 -0500 Subject: [PATCH 03/10] Adding `target` directories to ignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d40f148f62..da7131f349 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ Temporary Items /build/ /bin/ /doc/ +**/target/** # Created by https://www.gitignore.io test-output From 6acba42e394ad1b18a1070c3b5b56eb4fcfce78a Mon Sep 17 00:00:00 2001 From: "Danielewski, Dariusz" Date: Wed, 30 Dec 2020 01:57:35 -0500 Subject: [PATCH 04/10] Resolved maven cross module dependencies and updated Lombok decorators --- cyclops-anym/pom.xml | 25 +++++++++++++++++++ cyclops-futurestream/pom.xml | 8 ++++++ .../react/simple/AlgorithmCompareTest.java | 25 ++++++++----------- cyclops-reactive-collections/pom.xml | 8 ++++++ cyclops-reactor-integration/pom.xml | 14 +++++++++++ cyclops-rxjava2-integration/pom.xml | 14 +++++++++++ cyclops/pom.xml | 17 +++++++++++++ 7 files changed, 96 insertions(+), 15 deletions(-) diff --git a/cyclops-anym/pom.xml b/cyclops-anym/pom.xml index f421c41344..68823f7dcd 100644 --- a/cyclops-anym/pom.xml +++ b/cyclops-anym/pom.xml @@ -56,6 +56,13 @@ 10.4.0 compile + + com.oath.cyclops + cyclops + 10.4.0 + test-jar + test + com.oath.cyclops cyclops-futurestream @@ -99,4 +106,22 @@ test + + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.0 + + + + test-jar + + + + + + + diff --git a/cyclops-futurestream/pom.xml b/cyclops-futurestream/pom.xml index c8877e6321..c6893f1aa1 100644 --- a/cyclops-futurestream/pom.xml +++ b/cyclops-futurestream/pom.xml @@ -53,6 +53,14 @@ com.oath.cyclops cyclops + 10.4.0 + + + com.oath.cyclops + cyclops + 10.4.0 + test-jar + test com.oath.cyclops diff --git a/cyclops-futurestream/src/test/java/cyclops/futurestream/react/simple/AlgorithmCompareTest.java b/cyclops-futurestream/src/test/java/cyclops/futurestream/react/simple/AlgorithmCompareTest.java index 11837a390d..6f16bf0aa5 100644 --- a/cyclops-futurestream/src/test/java/cyclops/futurestream/react/simple/AlgorithmCompareTest.java +++ b/cyclops-futurestream/src/test/java/cyclops/futurestream/react/simple/AlgorithmCompareTest.java @@ -1,25 +1,20 @@ package cyclops.futurestream.react.simple; -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; +import com.oath.cyclops.util.SimpleTimer; +import cyclops.futurestream.SimpleReact; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.With; +import org.junit.Test; import java.util.ArrayList; import java.util.LinkedList; import java.util.List; import java.util.concurrent.ExecutionException; -import org.junit.Test; - -import cyclops.futurestream.SimpleReact; -import com.oath.cyclops.util.SimpleTimer; - -import lombok.AllArgsConstructor; -import lombok.Getter; -import lombok.experimental.Builder; -import lombok.experimental.Wither; - - - +import static org.hamcrest.Matchers.is; +import static org.junit.Assert.assertThat; public class AlgorithmCompareTest { @@ -79,7 +74,7 @@ private int retrieval(List list) { - @Wither + @With @Getter @AllArgsConstructor @Builder diff --git a/cyclops-reactive-collections/pom.xml b/cyclops-reactive-collections/pom.xml index 7d740d150c..12b85e8244 100644 --- a/cyclops-reactive-collections/pom.xml +++ b/cyclops-reactive-collections/pom.xml @@ -53,6 +53,14 @@ com.oath.cyclops cyclops + 10.4.0 + + + com.oath.cyclops + cyclops + 10.4.0 + test-jar + test org.reactivestreams diff --git a/cyclops-reactor-integration/pom.xml b/cyclops-reactor-integration/pom.xml index 5e7ffcc33c..e9da8a43cf 100644 --- a/cyclops-reactor-integration/pom.xml +++ b/cyclops-reactor-integration/pom.xml @@ -41,6 +41,13 @@ 10.4.0 compile + + com.oath.cyclops + cyclops + 10.4.0 + test-jar + test + com.oath.cyclops cyclops-pure @@ -53,6 +60,13 @@ 10.4.0 compile + + com.oath.cyclops + cyclops-anym + 10.4.0 + test-jar + test + com.oath.cyclops cyclops-futurestream diff --git a/cyclops-rxjava2-integration/pom.xml b/cyclops-rxjava2-integration/pom.xml index 84ae52946e..6e902d4a01 100644 --- a/cyclops-rxjava2-integration/pom.xml +++ b/cyclops-rxjava2-integration/pom.xml @@ -41,12 +41,26 @@ 10.4.0 compile + + com.oath.cyclops + cyclops + 10.4.0 + test-jar + test + com.oath.cyclops cyclops-anym 10.4.0 compile + + com.oath.cyclops + cyclops-anym + 10.4.0 + test-jar + test + com.oath.cyclops cyclops-futurestream diff --git a/cyclops/pom.xml b/cyclops/pom.xml index de30183270..38a564fb1e 100644 --- a/cyclops/pom.xml +++ b/cyclops/pom.xml @@ -7,6 +7,7 @@ com.oath.cyclops 10.4.0 + jar 4.0.0 com.oath.cyclops cyclops @@ -147,4 +148,20 @@ test + + + + org.apache.maven.plugins + maven-jar-plugin + 3.2.0 + + + + test-jar + + + + + + From 5a9ae861088e4182ea3df19c32bfa9c389023e4a Mon Sep 17 00:00:00 2001 From: "Danielewski, Dariusz" Date: Wed, 30 Dec 2020 09:08:41 -0500 Subject: [PATCH 05/10] Upgraded TestNG, JUnit and surefire plugin to get tests running in maven build --- cyclops-anym/pom.xml | 2 +- cyclops-futurestream/pom.xml | 4 ++-- cyclops-jackson-integration/pom.xml | 2 +- cyclops-pure/pom.xml | 4 ++-- cyclops-reactive-collections/pom.xml | 4 ++-- cyclops-reactor-integration/pom.xml | 2 +- cyclops-rxjava2-integration/pom.xml | 2 +- cyclops/pom.xml | 2 +- pom.xml | 19 +++++++++++++++++++ 9 files changed, 30 insertions(+), 11 deletions(-) diff --git a/cyclops-anym/pom.xml b/cyclops-anym/pom.xml index 68823f7dcd..cfedf925fd 100644 --- a/cyclops-anym/pom.xml +++ b/cyclops-anym/pom.xml @@ -90,7 +90,7 @@ junit junit - 4.12 + ${junit.version} test diff --git a/cyclops-futurestream/pom.xml b/cyclops-futurestream/pom.xml index c6893f1aa1..278cec7968 100644 --- a/cyclops-futurestream/pom.xml +++ b/cyclops-futurestream/pom.xml @@ -95,13 +95,13 @@ junit junit - 4.12 + ${junit.version} test org.testng testng - 5.14.10 + ${testng.version} test diff --git a/cyclops-jackson-integration/pom.xml b/cyclops-jackson-integration/pom.xml index b73d37a4c6..7d02ae79a0 100644 --- a/cyclops-jackson-integration/pom.xml +++ b/cyclops-jackson-integration/pom.xml @@ -62,7 +62,7 @@ junit junit - 4.12 + ${junit.version} test diff --git a/cyclops-pure/pom.xml b/cyclops-pure/pom.xml index 51301d70bb..014e21ea81 100644 --- a/cyclops-pure/pom.xml +++ b/cyclops-pure/pom.xml @@ -89,13 +89,13 @@ junit junit - 4.12 + ${junit.version} test org.testng testng - 5.14.10 + ${testng.version} test diff --git a/cyclops-reactive-collections/pom.xml b/cyclops-reactive-collections/pom.xml index 12b85e8244..3bdc4efdd4 100644 --- a/cyclops-reactive-collections/pom.xml +++ b/cyclops-reactive-collections/pom.xml @@ -107,13 +107,13 @@ junit junit - 4.12 + ${junit.version} test org.testng testng - 5.14.10 + ${testng.version} test diff --git a/cyclops-reactor-integration/pom.xml b/cyclops-reactor-integration/pom.xml index e9da8a43cf..9feed76d14 100644 --- a/cyclops-reactor-integration/pom.xml +++ b/cyclops-reactor-integration/pom.xml @@ -94,7 +94,7 @@ junit junit - 4.12 + ${junit.version} test diff --git a/cyclops-rxjava2-integration/pom.xml b/cyclops-rxjava2-integration/pom.xml index 6e902d4a01..bec01cca5a 100644 --- a/cyclops-rxjava2-integration/pom.xml +++ b/cyclops-rxjava2-integration/pom.xml @@ -94,7 +94,7 @@ junit junit - 4.12 + ${junit.version} test diff --git a/cyclops/pom.xml b/cyclops/pom.xml index 38a564fb1e..21258c503e 100644 --- a/cyclops/pom.xml +++ b/cyclops/pom.xml @@ -102,7 +102,7 @@ junit junit - 4.12 + ${junit.version} test diff --git a/pom.xml b/pom.xml index 7cdcb6b874..62acff58e4 100644 --- a/pom.xml +++ b/pom.xml @@ -21,6 +21,8 @@ UTF-8 + 7.0.0 + 4.13.1 @@ -53,6 +55,23 @@ 8 + + org.apache.maven.plugins + maven-surefire-plugin + 3.0.0-M5 + + + org.apache.maven.surefire + surefire-junit47 + 3.0.0-M5 + + + org.apache.maven.surefire + surefire-testng + 3.0.0-M5 + + + From c48797814de11ef04f34757878d6424bb530b932 Mon Sep 17 00:00:00 2001 From: "Danielewski, Dariusz" Date: Wed, 30 Dec 2020 10:46:10 -0500 Subject: [PATCH 06/10] Added maven configuration, since the tests require over 4G of memory allocation --- .mvn/jvm.config | 1 + .mvn/maven.config | 1 + 2 files changed, 2 insertions(+) create mode 100644 .mvn/jvm.config create mode 100644 .mvn/maven.config diff --git a/.mvn/jvm.config b/.mvn/jvm.config new file mode 100644 index 0000000000..d45a55c6a4 --- /dev/null +++ b/.mvn/jvm.config @@ -0,0 +1 @@ +-Xmx8G -Xshare:off -XX:TieredStopAtLevel=1 -XX:+UseParallelGC -Djava.awt.headless=true -Dmaven.artifact.threads=4 diff --git a/.mvn/maven.config b/.mvn/maven.config new file mode 100644 index 0000000000..2a9e81da3c --- /dev/null +++ b/.mvn/maven.config @@ -0,0 +1 @@ +-T4.0C -U From 67a89546fe7594df587996274bc3162ae1dc8916 Mon Sep 17 00:00:00 2001 From: "Danielewski, Dariusz" Date: Wed, 30 Dec 2020 11:56:41 -0500 Subject: [PATCH 07/10] Updated maven dependencies to latest versions --- cyclops-anym/pom.xml | 4 ++-- cyclops-futurestream/pom.xml | 14 +++++++------- cyclops-jackson-integration/pom.xml | 6 +++--- cyclops-pure/pom.xml | 10 +++++----- cyclops-reactive-collections/pom.xml | 16 ++++++++-------- cyclops-reactor-integration/pom.xml | 16 ++++++++-------- cyclops-rxjava2-integration/pom.xml | 18 +++++++++--------- cyclops/pom.xml | 22 +++++++++++----------- pom.xml | 22 +++++++++++----------- 9 files changed, 64 insertions(+), 64 deletions(-) diff --git a/cyclops-anym/pom.xml b/cyclops-anym/pom.xml index cfedf925fd..7889606c86 100644 --- a/cyclops-anym/pom.xml +++ b/cyclops-anym/pom.xml @@ -84,7 +84,7 @@ io.projectreactor reactor-core - 3.0.7.RELEASE + 3.4.1 test @@ -102,7 +102,7 @@ com.github.stefanbirkner system-rules - 1.10.0 + 1.19.0 test diff --git a/cyclops-futurestream/pom.xml b/cyclops-futurestream/pom.xml index 278cec7968..038ca50226 100644 --- a/cyclops-futurestream/pom.xml +++ b/cyclops-futurestream/pom.xml @@ -71,19 +71,19 @@ org.reactivestreams reactive-streams-tck - 1.0.0 + ${reactive-streams.version} test org.mockito mockito-core - 1.9.5 + ${mocikto-core.version} test io.projectreactor reactor-core - 3.0.7.RELEASE + 3.4.1 test @@ -107,25 +107,25 @@ com.github.stefanbirkner system-rules - 1.10.0 + 1.19.0 test io.vertx vertx-core - 3.0.0 + ${vertx-core.version} test org.hibernate hibernate-core - 5.1.0.Final + 5.4.27.Final test org.hibernate hibernate-entitymanager - 5.1.0.Final + 5.4.27.Final test diff --git a/cyclops-jackson-integration/pom.xml b/cyclops-jackson-integration/pom.xml index 7d02ae79a0..2b103332ec 100644 --- a/cyclops-jackson-integration/pom.xml +++ b/cyclops-jackson-integration/pom.xml @@ -44,7 +44,7 @@ com.fasterxml.jackson.core jackson-databind - 2.10.1 + 2.12.0 compile @@ -56,7 +56,7 @@ com.fasterxml.jackson.datatype jackson-datatype-jdk8 - 2.10.1 + 2.12.0 test @@ -74,7 +74,7 @@ org.mockito mockito-all - 1.9.5 + ${mocikto-all.version} test diff --git a/cyclops-pure/pom.xml b/cyclops-pure/pom.xml index 014e21ea81..bd19318fbc 100644 --- a/cyclops-pure/pom.xml +++ b/cyclops-pure/pom.xml @@ -65,19 +65,19 @@ org.reactivestreams reactive-streams-tck - 1.0.0 + ${reactive-streams.version} test org.mockito mockito-core - 1.9.5 + ${mocikto-core.version} test io.projectreactor reactor-core - 3.0.7.RELEASE + 3.4.1 test @@ -101,13 +101,13 @@ com.github.stefanbirkner system-rules - 1.10.0 + 1.19.0 test io.vertx vertx-core - 3.0.0 + ${vertx-core.version} test diff --git a/cyclops-reactive-collections/pom.xml b/cyclops-reactive-collections/pom.xml index 3bdc4efdd4..47cb1b5ac8 100644 --- a/cyclops-reactive-collections/pom.xml +++ b/cyclops-reactive-collections/pom.xml @@ -65,25 +65,25 @@ org.reactivestreams reactive-streams-tck - 1.0.0 + ${reactive-streams.version} test io.projectreactor reactor-test - 3.2.2.RELEASE + 3.4.1 test org.mockito mockito-core - 1.9.5 + ${mocikto-core.version} test io.projectreactor reactor-core - 3.0.7.RELEASE + 3.4.1 test @@ -95,13 +95,13 @@ com.google.guava guava - 19.0 + 30.1-jre test com.google.guava guava-testlib - 19.0 + 30.1-jre test @@ -119,13 +119,13 @@ com.github.stefanbirkner system-rules - 1.10.0 + 1.19.0 test io.vertx vertx-core - 3.0.0 + ${vertx-core.version} test diff --git a/cyclops-reactor-integration/pom.xml b/cyclops-reactor-integration/pom.xml index 9feed76d14..67881d12d7 100644 --- a/cyclops-reactor-integration/pom.xml +++ b/cyclops-reactor-integration/pom.xml @@ -82,13 +82,13 @@ io.projectreactor reactor-core - 3.3.1.RELEASE + 3.4.1 compile commons-io commons-io - 2.4 + 2.8.0 test @@ -106,37 +106,37 @@ org.mockito mockito-all - 1.9.5 + ${mocikto-all.version} test org.reactivestreams reactive-streams-tck - 1.0.0 + ${reactive-streams.version} test org.assertj assertj-core - 3.2.0 + 3.18.1 test com.github.stefanbirkner system-rules - 1.10.0 + 1.19.0 test org.hibernate hibernate-core - 5.1.0.Final + 5.4.27.Final test org.hibernate hibernate-entitymanager - 5.1.0.Final + 5.4.27.Final test diff --git a/cyclops-rxjava2-integration/pom.xml b/cyclops-rxjava2-integration/pom.xml index bec01cca5a..fbedf52341 100644 --- a/cyclops-rxjava2-integration/pom.xml +++ b/cyclops-rxjava2-integration/pom.xml @@ -76,19 +76,19 @@ io.reactivex.rxjava2 rxjava - 2.2.16 + 2.2.20 compile io.projectreactor reactor-core - 3.3.1.RELEASE + 3.4.1 test commons-io commons-io - 2.4 + 2.8.0 test @@ -106,37 +106,37 @@ org.mockito mockito-all - 1.9.5 + ${mocikto-all.version} test org.reactivestreams reactive-streams-tck - 1.0.0 + ${reactive-streams.version} test org.assertj assertj-core - 3.2.0 + 3.18.1 test com.github.stefanbirkner system-rules - 1.10.0 + 1.19.0 test org.hibernate hibernate-core - 5.1.0.Final + 5.4.27.Final test org.hibernate hibernate-entitymanager - 5.1.0.Final + 5.4.27.Final test diff --git a/cyclops/pom.xml b/cyclops/pom.xml index 21258c503e..ff33b74f31 100644 --- a/cyclops/pom.xml +++ b/cyclops/pom.xml @@ -60,7 +60,7 @@ org.reactivestreams reactive-streams - 1.0.0 + ${reactive-streams.version} compile @@ -72,31 +72,31 @@ com.google.guava guava - 19.0 + 30.1-jre test io.projectreactor reactor-test - 3.2.2.RELEASE + 3.4.1 test com.github.stefanbirkner system-rules - 1.10.0 + 1.19.0 test io.projectreactor reactor-core - 3.2.2.RELEASE + 3.4.1 test org.reactivestreams reactive-streams-tck - 1.0.0 + ${reactive-streams.version} test @@ -114,7 +114,7 @@ org.mockito mockito-all - 1.9.5 + ${mocikto-all.version} test @@ -126,25 +126,25 @@ org.assertj assertj-core - 3.8.0 + 3.18.1 test org.hibernate hibernate-core - 5.1.0.Final + 5.4.27.Final test org.hibernate hibernate-entitymanager - 5.1.0.Final + 5.4.27.Final test org.hsqldb hsqldb - 2.0.0 + 2.5.1 test diff --git a/pom.xml b/pom.xml index 62acff58e4..5d40cb46c5 100644 --- a/pom.xml +++ b/pom.xml @@ -7,6 +7,7 @@ com.oath.cyclops 10.4.0 pom + AOL Cyclops cyclops @@ -21,8 +22,12 @@ UTF-8 - 7.0.0 + 7.3.0 4.13.1 + 1.10.19 + 3.6.28 + 1.0.3 + 4.0.0 @@ -33,16 +38,6 @@ - - - - com.oath.cyclops - cyclops - 10.4.0 - - - - @@ -72,6 +67,11 @@ + + org.codehaus.mojo + versions-maven-plugin + 2.7 + From 456025c81ee10d929e57af7768a478194d93dbb5 Mon Sep 17 00:00:00 2001 From: "Danielewski, Dariusz" Date: Wed, 30 Dec 2020 12:04:33 -0500 Subject: [PATCH 08/10] Compatibility fix: PublisherVerificationRules moved to flow.support --- .../push/filter/FilterRangeIntTckPublisherTest.java | 4 ++-- .../push/filter/FilterRangeLongTckPublisherTest.java | 4 ++-- .../push/filter/FilterSpliteratorTckPublisherTest.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cyclops/src/test/java/com/oath/cyclops/internal/stream/spliterators/push/filter/FilterRangeIntTckPublisherTest.java b/cyclops/src/test/java/com/oath/cyclops/internal/stream/spliterators/push/filter/FilterRangeIntTckPublisherTest.java index 0670ea104c..d72e6bac0a 100644 --- a/cyclops/src/test/java/com/oath/cyclops/internal/stream/spliterators/push/filter/FilterRangeIntTckPublisherTest.java +++ b/cyclops/src/test/java/com/oath/cyclops/internal/stream/spliterators/push/filter/FilterRangeIntTckPublisherTest.java @@ -5,11 +5,11 @@ import org.reactivestreams.Publisher; import org.reactivestreams.tck.PublisherVerification; import org.reactivestreams.tck.TestEnvironment; -import org.reactivestreams.tck.support.PublisherVerificationRules; +import org.reactivestreams.tck.flow.support.PublisherVerificationRules; import org.testng.annotations.Test; @Test -public class FilterRangeIntTckPublisherTest extends PublisherVerification implements PublisherVerificationRules{ +public class FilterRangeIntTckPublisherTest extends PublisherVerification implements PublisherVerificationRules { public FilterRangeIntTckPublisherTest(){ super(new TestEnvironment(300L)); diff --git a/cyclops/src/test/java/com/oath/cyclops/internal/stream/spliterators/push/filter/FilterRangeLongTckPublisherTest.java b/cyclops/src/test/java/com/oath/cyclops/internal/stream/spliterators/push/filter/FilterRangeLongTckPublisherTest.java index d87875b9a9..e9f5eab818 100644 --- a/cyclops/src/test/java/com/oath/cyclops/internal/stream/spliterators/push/filter/FilterRangeLongTckPublisherTest.java +++ b/cyclops/src/test/java/com/oath/cyclops/internal/stream/spliterators/push/filter/FilterRangeLongTckPublisherTest.java @@ -5,11 +5,11 @@ import org.reactivestreams.Publisher; import org.reactivestreams.tck.PublisherVerification; import org.reactivestreams.tck.TestEnvironment; -import org.reactivestreams.tck.support.PublisherVerificationRules; +import org.reactivestreams.tck.flow.support.PublisherVerificationRules; import org.testng.annotations.Test; @Test -public class FilterRangeLongTckPublisherTest extends PublisherVerification implements PublisherVerificationRules{ +public class FilterRangeLongTckPublisherTest extends PublisherVerification implements PublisherVerificationRules { public FilterRangeLongTckPublisherTest(){ super(new TestEnvironment(300L)); diff --git a/cyclops/src/test/java/com/oath/cyclops/internal/stream/spliterators/push/filter/FilterSpliteratorTckPublisherTest.java b/cyclops/src/test/java/com/oath/cyclops/internal/stream/spliterators/push/filter/FilterSpliteratorTckPublisherTest.java index 528ab6c178..8e6bfb31ee 100644 --- a/cyclops/src/test/java/com/oath/cyclops/internal/stream/spliterators/push/filter/FilterSpliteratorTckPublisherTest.java +++ b/cyclops/src/test/java/com/oath/cyclops/internal/stream/spliterators/push/filter/FilterSpliteratorTckPublisherTest.java @@ -6,11 +6,11 @@ import org.reactivestreams.Publisher; import org.reactivestreams.tck.PublisherVerification; import org.reactivestreams.tck.TestEnvironment; -import org.reactivestreams.tck.support.PublisherVerificationRules; +import org.reactivestreams.tck.flow.support.PublisherVerificationRules; import org.testng.annotations.Test; @Test -public class FilterSpliteratorTckPublisherTest extends PublisherVerification implements PublisherVerificationRules{ +public class FilterSpliteratorTckPublisherTest extends PublisherVerification implements PublisherVerificationRules { public FilterSpliteratorTckPublisherTest(){ super(new TestEnvironment(300L)); From e08e1561252766d66e4acb90fc520e281c2e28ac Mon Sep 17 00:00:00 2001 From: "Danielewski, Dariusz" Date: Wed, 30 Dec 2020 13:36:03 -0500 Subject: [PATCH 09/10] All compatibility issues with upgraded libraries resolved --- cyclops-futurestream/pom.xml | 5 + .../futurestream/HibernateManagedTest.java | 6 +- .../react/async/vertx/VertxTest.java | 156 +++++++++--------- cyclops-reactor-integration/pom.xml | 2 +- .../reactive/HibernateManagedTest.java | 48 +++--- cyclops-rxjava2-integration/pom.xml | 2 +- .../reactive/HibernateManagedTest.java | 47 +++--- .../reactive/HibernateManagedTest.java | 65 ++++---- pom.xml | 1 + 9 files changed, 167 insertions(+), 165 deletions(-) diff --git a/cyclops-futurestream/pom.xml b/cyclops-futurestream/pom.xml index 038ca50226..67a14261f5 100644 --- a/cyclops-futurestream/pom.xml +++ b/cyclops-futurestream/pom.xml @@ -116,6 +116,11 @@ ${vertx-core.version} test + + io.vertx + vertx-web-client + 4.0.0 + org.hibernate hibernate-core diff --git a/cyclops-futurestream/src/test/java/cyclops/futurestream/HibernateManagedTest.java b/cyclops-futurestream/src/test/java/cyclops/futurestream/HibernateManagedTest.java index 984b380878..6a79921f01 100644 --- a/cyclops-futurestream/src/test/java/cyclops/futurestream/HibernateManagedTest.java +++ b/cyclops-futurestream/src/test/java/cyclops/futurestream/HibernateManagedTest.java @@ -1,12 +1,10 @@ package cyclops.futurestream; import cyclops.control.Try; -import cyclops.reactive.IO; -import cyclops.reactive.Managed; -import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; +import org.hibernate.query.NativeQuery; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; @@ -24,7 +22,7 @@ public void setup(){ session = mock(Session.class); when(factory.openSession()).thenReturn(session); when(session.beginTransaction()).thenReturn(mock(Transaction.class)); - when(session.createQuery(Mockito.anyString())).thenReturn(mock(Query.class)); + when(session.createQuery(Mockito.anyString())).thenReturn(mock(NativeQuery.class)); } diff --git a/cyclops-futurestream/src/test/java/cyclops/futurestream/react/async/vertx/VertxTest.java b/cyclops-futurestream/src/test/java/cyclops/futurestream/react/async/vertx/VertxTest.java index 0d16936d0d..418b523cae 100644 --- a/cyclops-futurestream/src/test/java/cyclops/futurestream/react/async/vertx/VertxTest.java +++ b/cyclops-futurestream/src/test/java/cyclops/futurestream/react/async/vertx/VertxTest.java @@ -1,128 +1,124 @@ package cyclops.futurestream.react.async.vertx; -import static org.hamcrest.Matchers.equalTo; -import static cyclops.data.tuple.Tuple.tuple; -import static org.junit.Assert.assertThat; - -import java.util.concurrent.CompletableFuture; - -import org.junit.Ignore; -import org.junit.Test; - -import cyclops.futurestream.LazyReact; -import cyclops.reactive.ReactiveSeq; -import cyclops.futurestream.SimpleReact; -import com.oath.cyclops.async.adapters.Queue; import com.oath.cyclops.async.QueueFactories; +import com.oath.cyclops.async.adapters.Queue; import com.oath.cyclops.async.wait.WaitStrategy; - +import cyclops.futurestream.LazyReact; +import cyclops.futurestream.SimpleReact; +import cyclops.reactive.ReactiveSeq; import io.vertx.core.Vertx; import io.vertx.core.http.HttpServer; import io.vertx.core.http.HttpServerOptions; import io.vertx.core.http.HttpServerRequest; +import io.vertx.ext.web.client.WebClient; +import org.junit.Ignore; +import org.junit.Test; +import java.util.concurrent.CompletableFuture; -public class VertxTest { - @Test - public void sum(){ - Vertx vertx = Vertx.factory.vertx(); - - LazyReact react = new LazyReact(c->vertx.runOnContext(v -> c.run())); - int number = react.of(1, 2, 3).map(i -> i + 1).reduce((a,b) -> a + b).orElse(Integer.MIN_VALUE); - System.out.println("sum = " + number); // 2 + 3 + 4 = 9 +import static cyclops.data.tuple.Tuple.tuple; +import static org.hamcrest.Matchers.equalTo; +import static org.junit.Assert.assertThat; - assertThat(number,equalTo(9)); - } - @Test @Ignore - public void httpServer(){ - Vertx vertx = Vertx.factory.vertx(); - CompletableFuture server =new CompletableFuture<>(); +public class VertxTest { + @Test + public void sum() { + Vertx vertx = Vertx.vertx(); + LazyReact react = new LazyReact(c -> vertx.runOnContext(v -> c.run())); + int number = react.of(1, 2, 3).map(i -> i + 1).reduce((a, b) -> a + b).orElse(Integer.MIN_VALUE); + System.out.println("sum = " + number); // 2 + 3 + 4 = 9 + assertThat(number, equalTo(9)); + } - Queue reqs = QueueFactories.boundedNonBlockingQueue(1000, - WaitStrategy.spinWait()) - .build(); + @Test + @Ignore + public void httpServer() { + Vertx vertx = Vertx.vertx(); + CompletableFuture server = new CompletableFuture<>(); - vertx.createHttpServer(new HttpServerOptions(). - setPort(8080). - setHost("localhost") - ) - .requestHandler(event-> { - reqs.add(event); - System.out.println(event.absoluteURI()); - }).listen(e->{ - if(e.succeeded()) - server.complete(e.result()); - else - server.completeExceptionally(e.cause()); - }); - LazyReact react = new LazyReact(c->vertx.runOnContext(v -> c.run())); + Queue reqs = QueueFactories.boundedNonBlockingQueue(1000, + WaitStrategy.spinWait()) + .build(); - react.fromStream(reqs.stream()) - .filter(req->req.getParam("num")!=null) - .peek(i->System.out.println("grouping " + i)) - .grouped(2) - .map(list-> tuple(list.getOrElse(0,null).response(),list.getOrElse(1,null).response(),getParam(list.getOrElse(0,null)), - getParam(list.getOrElse(1,null)))) - .peek(i->System.out.println("peeking + "+i)) - .peek(t->t._1().end("adding "+(t._3()+t._4()))) - .peek(t->t._2().end("multiplying "+t._3()*t._4())) - .run(); + vertx.createHttpServer(new HttpServerOptions(). + setPort(8080). + setHost("localhost") + ) + .requestHandler(event -> { + reqs.add(event); + System.out.println(event.absoluteURI()); + }).listen(e -> { + if (e.succeeded()) + server.complete(e.result()); + else + server.completeExceptionally(e.cause()); + }); - new SimpleReact(c->vertx.runOnContext(v -> c.run())).from(server) - .then(s->"server started") - .onFail(e->"failed toNested skip "+e.getMessage()) - .peek(System.out::println); + LazyReact react = new LazyReact(c -> vertx.runOnContext(v -> c.run())); - while(true){ + react.fromStream(reqs.stream()) + .filter(req -> req.getParam("num") != null) + .peek(i -> System.out.println("grouping " + i)) + .grouped(2) + .map(list -> tuple(list.getOrElse(0, null).response(), list.getOrElse(1, null).response(), getParam(list.getOrElse(0, null)), + getParam(list.getOrElse(1, null)))) + .peek(i -> System.out.println("peeking + " + i)) + .peek(t -> t._1().end("adding " + (t._3() + t._4()))) + .peek(t -> t._2().end("multiplying " + t._3() * t._4())) + .run(); - } + new SimpleReact(c -> vertx.runOnContext(v -> c.run())).from(server) + .then(s -> "server started") + .onFail(e -> "failed toNested skip " + e.getMessage()) + .peek(System.out::println); + while (true) { - } + } - private int getParam(HttpServerRequest req){ - return Integer.parseInt(req.getParam("num")); - } + } + private int getParam(HttpServerRequest req) { + return Integer.parseInt(req.getParam("num")); + } - @Test @Ignore - public void downloadUrls(){ + @Test + @Ignore + public void downloadUrls() { - //cyclops2-react async.Queues + //cyclops2-react async.Queues Queue downloadQueue = new Queue(); Queue completedQueue = new Queue(); //vert.x meets cyclops2-react - Vertx vertx = Vertx.factory.vertx(); - LazyReact react = new LazyReact(c->vertx.runOnContext(v -> c.run())); + Vertx vertx = Vertx.vertx(); + LazyReact react = new LazyReact(c -> vertx.runOnContext(v -> c.run())); //populate the download queue asynchronously - ReactiveSeq.of("www.aol.com","www.rte.ie","www.aol.com") - .peek(next->System.out.println("adding toNested download queue " + next)) - .runFuture(c->vertx.runOnContext(v -> c.run()),t->t.forEach(downloadQueue::add,System.err::println)); + ReactiveSeq.of("www.aol.com", "www.rte.ie", "www.aol.com") + .peek(next -> System.out.println("adding toNested download queue " + next)) + .runFuture(c -> vertx.runOnContext(v -> c.run()), t -> t.forEach(downloadQueue::add, System.err::println)); //download asynchronously : all cyclops2-react tasks are passed into vert.x react.fromStream(downloadQueue.stream()) - .peek(System.out::println) - .map(url->vertx.createHttpClient().getNow(url,"",resp->resp.bodyHandler(body-> completedQueue.add(body.getString(0, body.length()))))) - .run(); - + .peek(System.out::println) + .map(url -> WebClient.create(vertx).get(443, url, "").send().onSuccess(response-> completedQueue.add(response.bodyAsString()))) + .run(); //handle the results completedQueue.stream() - .peek(next->System.out.println("just downloaded" + next)) - .forEach(System.out::println); - + .peek(next -> System.out.println("just downloaded" + next)) + .forEach(System.out::println); } diff --git a/cyclops-reactor-integration/pom.xml b/cyclops-reactor-integration/pom.xml index 67881d12d7..a81e7a5afc 100644 --- a/cyclops-reactor-integration/pom.xml +++ b/cyclops-reactor-integration/pom.xml @@ -88,7 +88,7 @@ commons-io commons-io - 2.8.0 + ${commoms-io.version} test diff --git a/cyclops-reactor-integration/src/test/java/cyclops/reactive/HibernateManagedTest.java b/cyclops-reactor-integration/src/test/java/cyclops/reactive/HibernateManagedTest.java index cb1e106a17..ca940b06ba 100644 --- a/cyclops-reactor-integration/src/test/java/cyclops/reactive/HibernateManagedTest.java +++ b/cyclops-reactor-integration/src/test/java/cyclops/reactive/HibernateManagedTest.java @@ -1,11 +1,10 @@ package cyclops.reactive; import cyclops.control.Try; -import cyclops.futurestream.FutureStreamIO; -import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; +import org.hibernate.query.NativeQuery; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; @@ -17,17 +16,18 @@ public class HibernateManagedTest { SessionFactory factory; Session session; + @Before - public void setup(){ + public void setup() { factory = mock(SessionFactory.class); session = mock(Session.class); when(factory.openSession()).thenReturn(session); when(session.beginTransaction()).thenReturn(mock(Transaction.class)); - when(session.createQuery(Mockito.anyString())).thenReturn(mock(Query.class)); + when(session.createQuery(Mockito.anyString())).thenReturn(mock(NativeQuery.class)); } - private Try deleteFromMyTable(Session s){ + private Try deleteFromMyTable(Session s) { s.createQuery("DELETE FROM myTable") .executeUpdate(); s.flush(); @@ -35,44 +35,44 @@ private Try deleteFromMyTable(Session s){ } @Test - public void hibernate(){ + public void hibernate() { Try res = FluxManaged.of(factory::openSession) - .with(Session::beginTransaction) - .map((session, tx) ->{ - try { - verify(session,never()).close(); - }catch(Exception e) { - } + .with(Session::beginTransaction) + .map((session, tx) -> { + try { + verify(session, never()).close(); + } catch (Exception e) { + } - return deleteFromMyTable(session) - .bipeek(success -> tx.commit(),error -> tx.rollback()); + return deleteFromMyTable(session) + .bipeek(success -> tx.commit(), error -> tx.rollback()); - } ).foldRun(Try::flatten); + }).foldRun(Try::flatten); - assertThat(res,equalTo(Try.success("deleted"))); + assertThat(res, equalTo(Try.success("deleted"))); } @Test - public void hibernateIO(){ + public void hibernateIO() { Try res = FluxIO.just(factory) - .checkedBracketWith(SessionFactory::openSession,Session::beginTransaction) - .mapIO((session, tx) ->{ + .checkedBracketWith(SessionFactory::openSession, Session::beginTransaction) + .mapIO((session, tx) -> { try { - verify(session,never()).close(); - }catch(Exception e) { + verify(session, never()).close(); + } catch (Exception e) { } return deleteFromMyTable(session) - .bipeek(success -> tx.commit(),error -> tx.rollback()); + .bipeek(success -> tx.commit(), error -> tx.rollback()); - } ).foldRun(Try::flatten); + }).foldRun(Try::flatten); - assertThat(res,equalTo(Try.success("deleted"))); + assertThat(res, equalTo(Try.success("deleted"))); } diff --git a/cyclops-rxjava2-integration/pom.xml b/cyclops-rxjava2-integration/pom.xml index fbedf52341..1c4aa8c9ec 100644 --- a/cyclops-rxjava2-integration/pom.xml +++ b/cyclops-rxjava2-integration/pom.xml @@ -88,7 +88,7 @@ commons-io commons-io - 2.8.0 + ${commoms-io.version} test diff --git a/cyclops-rxjava2-integration/src/test/java/cyclops/reactive/HibernateManagedTest.java b/cyclops-rxjava2-integration/src/test/java/cyclops/reactive/HibernateManagedTest.java index bbb1bb4ba1..6ee814f1ac 100644 --- a/cyclops-rxjava2-integration/src/test/java/cyclops/reactive/HibernateManagedTest.java +++ b/cyclops-rxjava2-integration/src/test/java/cyclops/reactive/HibernateManagedTest.java @@ -1,10 +1,10 @@ package cyclops.reactive; import cyclops.control.Try; -import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; +import org.hibernate.query.NativeQuery; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; @@ -16,17 +16,18 @@ public class HibernateManagedTest { SessionFactory factory; Session session; + @Before - public void setup(){ + public void setup() { factory = mock(SessionFactory.class); session = mock(Session.class); when(factory.openSession()).thenReturn(session); when(session.beginTransaction()).thenReturn(mock(Transaction.class)); - when(session.createQuery(Mockito.anyString())).thenReturn(mock(Query.class)); + when(session.createQuery(Mockito.anyString())).thenReturn(mock(NativeQuery.class)); } - private Try deleteFromMyTable(Session s){ + private Try deleteFromMyTable(Session s) { s.createQuery("DELETE FROM myTable") .executeUpdate(); s.flush(); @@ -34,44 +35,44 @@ private Try deleteFromMyTable(Session s){ } @Test - public void hibernate(){ + public void hibernate() { Try res = FlowableManaged.of(factory::openSession) - .with(Session::beginTransaction) - .map((session, tx) ->{ - try { - verify(session,never()).close(); - }catch(Exception e) { - } + .with(Session::beginTransaction) + .map((session, tx) -> { + try { + verify(session, never()).close(); + } catch (Exception e) { + } - return deleteFromMyTable(session) - .bipeek(success -> tx.commit(),error -> tx.rollback()); + return deleteFromMyTable(session) + .bipeek(success -> tx.commit(), error -> tx.rollback()); - } ).foldRun(Try::flatten); + }).foldRun(Try::flatten); - assertThat(res,equalTo(Try.success("deleted"))); + assertThat(res, equalTo(Try.success("deleted"))); } @Test - public void hibernateIO(){ + public void hibernateIO() { Try res = FlowableIO.just(factory) - .checkedBracketWith(SessionFactory::openSession,Session::beginTransaction) - .mapIO((session, tx) ->{ + .checkedBracketWith(SessionFactory::openSession, Session::beginTransaction) + .mapIO((session, tx) -> { try { - verify(session,never()).close(); - }catch(Exception e) { + verify(session, never()).close(); + } catch (Exception e) { } return deleteFromMyTable(session) - .bipeek(success -> tx.commit(),error -> tx.rollback()); + .bipeek(success -> tx.commit(), error -> tx.rollback()); - } ).foldRun(Try::flatten); + }).foldRun(Try::flatten); - assertThat(res,equalTo(Try.success("deleted"))); + assertThat(res, equalTo(Try.success("deleted"))); } diff --git a/cyclops/src/test/java/cyclops/reactive/HibernateManagedTest.java b/cyclops/src/test/java/cyclops/reactive/HibernateManagedTest.java index 6dd16cf5ea..84a646f68b 100644 --- a/cyclops/src/test/java/cyclops/reactive/HibernateManagedTest.java +++ b/cyclops/src/test/java/cyclops/reactive/HibernateManagedTest.java @@ -1,15 +1,14 @@ package cyclops.reactive; import cyclops.control.Try; -import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; +import org.hibernate.query.NativeQuery; import org.junit.Before; import org.junit.Test; import org.mockito.Mockito; -import static cyclops.data.tuple.Tuple.tuple; import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.equalTo; import static org.mockito.Mockito.*; @@ -17,17 +16,18 @@ public class HibernateManagedTest { SessionFactory factory; Session session; + @Before - public void setup(){ + public void setup() { factory = mock(SessionFactory.class); session = mock(Session.class); when(factory.openSession()).thenReturn(session); when(session.beginTransaction()).thenReturn(mock(Transaction.class)); - when(session.createQuery(Mockito.anyString())).thenReturn(mock(Query.class)); + when(session.createQuery(Mockito.anyString())).thenReturn(mock(NativeQuery.class)); } - private Try deleteFromMyTable(Session s){ + private Try deleteFromMyTable(Session s) { s.createQuery("DELETE FROM myTable") .executeUpdate(); s.flush(); @@ -35,64 +35,65 @@ private Try deleteFromMyTable(Session s){ } @Test - public void hibernate(){ + public void hibernate() { Try res = Managed.of(factory::openSession) - .with(Session::beginTransaction) - .map((session, tx) ->{ - try { - verify(session,never()).close(); - }catch(Exception e) { - } + .with(Session::beginTransaction) + .map((session, tx) -> { + try { + verify(session, never()).close(); + } catch (Exception e) { + } - return deleteFromMyTable(session) - .bipeek(success -> tx.commit(),error -> tx.rollback()); + return deleteFromMyTable(session) + .bipeek(success -> tx.commit(), error -> tx.rollback()); - } ).foldRun(Try::flatten); + }).foldRun(Try::flatten); - assertThat(res,equalTo(Try.success("deleted"))); + assertThat(res, equalTo(Try.success("deleted"))); } @Test - public void hibernateIO(){ + public void hibernateIO() { Try res = IO.of(factory) - .checkedBracketWith(SessionFactory::openSession,Session::beginTransaction) - .mapIO((session, tx) ->{ + .checkedBracketWith(SessionFactory::openSession, Session::beginTransaction) + .mapIO((session, tx) -> { try { - verify(session,never()).close(); - }catch(Exception e) { + verify(session, never()).close(); + } catch (Exception e) { } return deleteFromMyTable(session) - .bipeek(success -> tx.commit(),error -> tx.rollback()); + .bipeek(success -> tx.commit(), error -> tx.rollback()); - } ).foldRun(Try::flatten); + }).foldRun(Try::flatten); - assertThat(res,equalTo(Try.success("deleted"))); + assertThat(res, equalTo(Try.success("deleted"))); } + @Test - public void hibernateSyncIO(){ + public void hibernateSyncIO() { Try res = IO.SyncIO.of(factory) - .checkedBracketWith(SessionFactory::openSession,Session::beginTransaction) - .mapIO((session, tx) ->{ + .checkedBracketWith(SessionFactory::openSession, Session::beginTransaction) + .mapIO((session, tx) -> { try { - verify(session,never()).close(); - }catch(Exception e) { + verify(session, never()).close(); + } catch (Exception e) { } return deleteFromMyTable(session) - .bipeek(success -> tx.commit(),error -> tx.rollback()); + .bipeek(success -> tx.commit(), error -> tx.rollback()); - } ).foldRun(Try::flatten); + }).foldRun(Try::flatten); - assertThat(res,equalTo(Try.success("deleted"))); + assertThat(res, equalTo(Try.success("deleted"))); } diff --git a/pom.xml b/pom.xml index 5d40cb46c5..da5f9a66f8 100644 --- a/pom.xml +++ b/pom.xml @@ -28,6 +28,7 @@ 3.6.28 1.0.3 4.0.0 + 2.8.0 From 928876d65911d8af415861195ed117e816e4b18b Mon Sep 17 00:00:00 2001 From: "Danielewski, Dariusz" Date: Wed, 30 Dec 2020 15:16:30 -0500 Subject: [PATCH 10/10] Replaced Lombok's @experimental.Wither with @With and optimized imports --- .../internal/react/FutureStreamImpl.java | 16 ++++---- .../internal/react/SimpleReactStreamImpl.java | 4 +- .../react/async/future/ExecutionPipeline.java | 4 +- .../react/async/future/PipelineBuilder.java | 4 +- .../react/stream/EagerStreamWrapper.java | 4 +- .../react/stream/LazyStreamWrapper.java | 6 +-- .../react/collectors/lazy/EmptyCollector.java | 4 +- .../java/cyclops/futurestream/LazyReact.java | 2 +- .../cyclops/futurestream/SimpleReact.java | 4 +- .../instances/control/FutureInstances.java | 4 +- .../instances/control/OptionInstances.java | 4 +- .../instances/data/LazySeqInstances.java | 4 +- .../cyclops/instances/data/SeqInstances.java | 4 +- .../instances/data/VectorInstances.java | 4 +- .../jdk/CompletableFutureInstances.java | 4 +- .../instances/jdk/OptionalInstances.java | 4 +- .../instances/jdk/StreamInstances.java | 4 +- .../instances/reactive/IOInstances.java | 4 +- .../instances/reactive/IterableInstances.java | 4 +- .../reactive/PublisherInstances.java | 4 +- .../immutable/LinkedListXInstances.java | 4 +- .../immutable/PersistentQueueXInstances.java | 6 +-- .../immutable/PersistentSetXInstances.java | 4 +- .../immutable/VectorXInstances.java | 4 +- .../collections/mutable/DequeXInstances.java | 4 +- .../collections/mutable/ListXInstances.java | 4 +- .../collections/mutable/QueueXInstances.java | 4 +- .../collections/mutable/SetXInstances.java | 4 +- .../typeclasses/taglessfinal/Cases.java | 4 +- .../reactor/adapter/FluxReactiveSeqImpl.java | 4 +- .../rx2/adapter/FlowableReactiveSeqImpl.java | 4 +- .../adapter/ObservableReactiveSeqImpl.java | 4 +- .../oath/cyclops/async/QueueFactories.java | 11 +++--- .../oath/cyclops/async/adapters/Adapter.java | 12 +++--- .../async/adapters/AdaptersModule.java | 8 +--- .../oath/cyclops/async/adapters/Queue.java | 35 ++++++++---------- .../oath/cyclops/async/adapters/Signal.java | 4 +- .../oath/cyclops/async/adapters/Topic.java | 21 +++++------ .../wait/ExponentialBackofWaitStrategy.java | 4 +- .../internal/stream/BaseConnectableImpl.java | 10 ++--- .../internal/stream/BaseExtendedStream.java | 3 -- .../internal/stream/FutureStreamUtils.java | 9 ++--- .../internal/stream/IteratorHotStream.java | 10 ++--- .../internal/stream/OneShotStreamX.java | 14 ++++--- .../stream/PausableConnectableImpl.java | 8 ++-- .../internal/stream/ReactiveStreamX.java | 37 +++++++++---------- .../internal/stream/ReversedIterator.java | 9 ++--- .../cyclops/internal/stream/SeqUtils.java | 11 ++---- .../stream/SpliteratorBasedStream.java | 36 +++++++++--------- .../oath/cyclops/internal/stream/StreamX.java | 9 +++-- .../internal/stream/StreamableImpl.java | 1 - .../stream/operators/DebounceOperator.java | 7 ++-- .../stream/operators/MultiReduceOperator.java | 11 +++--- .../stream/operators/OnePerOperator.java | 7 ++-- .../stream/operators/RecoverOperator.java | 9 ++--- .../stream/publisher/PublisherIterable.java | 8 ++-- .../GroupedByTimeAndSizeSpliterator.java | 1 - .../GroupedByTimeSpliterator.java | 1 - .../GroupedStatefullySpliterator.java | 1 - .../spliterators/GroupedWhileSpliterator.java | 6 ++- .../spliterators/GroupingSpliterator.java | 1 - .../spliterators/LimitLastSpliterator.java | 6 +-- .../OnErrorBreakWithPublisherSpliterator.java | 1 - .../ReversingArraySpliterator.java | 6 +-- .../ReversingListSpliterator.java | 8 ++-- .../spliterators/SkipLastSpliterator.java | 6 +-- .../spliterators/UnfoldSpliterator.java | 2 - .../ints/ReversingRangeIntSpliterator.java | 8 ++-- .../longs/ReversingRangeLongSpliterator.java | 9 ++--- .../push/ArrayConcatonatingOperator.java | 3 -- .../spliterators/push/CapturingOperator.java | 6 +-- .../spliterators/push/CollectAllOperator.java | 1 - .../stream/spliterators/push/Concat.java | 1 - .../push/ConcurrentFlatMapper.java | 6 ++- .../spliterators/push/FlatMapPublisher.java | 4 +- .../push/GroupedByTimeAndSizeOperator.java | 1 - .../push/GroupedByTimeOperator.java | 1 - .../push/GroupedStatefullyOperator.java | 6 ++- .../push/GroupedWhileOperator.java | 1 - .../spliterators/push/GroupingOperator.java | 1 - .../spliterators/push/OnEmptyOperator.java | 1 - .../spliterators/push/OperatorToIterable.java | 2 - .../spliterators/push/ReduceAllOperator.java | 1 - .../spliterators/push/SlidingOperator.java | 1 - .../spliterators/push/StreamSubscription.java | 3 +- .../push/ValueEmittingSpliterator.java | 4 +- .../push/ZippingLatestOperator.java | 4 +- .../java/com/oath/cyclops/matching/Case.java | 10 ++--- .../oath/cyclops/matching/Deconstruct.java | 6 +-- .../com/oath/cyclops/matching/Matching.java | 7 +--- .../com/oath/cyclops/react/ThreadPools.java | 4 +- .../async/subscription/Subscription.java | 13 +++---- .../com/oath/cyclops/types/MonadicValue.java | 6 +-- .../com/oath/cyclops/types/OrElseValue.java | 2 - .../java/com/oath/cyclops/types/Value.java | 25 +++++-------- .../java/com/oath/cyclops/types/Zippable.java | 16 ++------ .../types/foldable/ConvertableSequence.java | 2 +- .../cyclops/types/foldable/Evaluation.java | 2 - .../oath/cyclops/types/foldable/Folds.java | 25 ++++++------- .../types/functor/BiTransformable.java | 2 - .../cyclops/types/functor/Transformable.java | 4 -- .../types/persistent/PersistentIndexed.java | 5 --- .../types/persistent/PersistentMap.java | 1 - .../types/persistent/views/MapView.java | 7 ++-- .../types/persistent/views/QueueView.java | 7 ++-- .../types/persistent/views/SetView.java | 7 ++-- .../types/persistent/views/SortedSetView.java | 1 - .../types/reactive/BufferOverflowPolicy.java | 1 - .../cyclops/types/reactive/Completable.java | 2 - .../types/reactive/QueueBasedSubscriber.java | 27 ++++++-------- .../ReactiveStreamsTerminalOperations.java | 4 +- .../types/reactive/ReactiveSubscriber.java | 12 +++--- .../cyclops/types/reactive/ReactiveTask.java | 13 +++---- .../types/reactive/ValueSubscriber.java | 21 +++++------ .../cyclops/types/stream/Connectable.java | 8 ++-- .../types/stream/NonPausableConnectable.java | 8 ++-- .../oath/cyclops/types/stream/ToStream.java | 6 --- .../types/traversable/IterableFilterable.java | 8 ++-- .../cyclops/types/traversable/IterableX.java | 8 ++-- .../types/traversable/Traversable.java | 12 +++--- .../oath/cyclops/util/ExceptionSoftener.java | 26 ++----------- .../oath/cyclops/util/box/LazyImmutable.java | 5 +-- .../oath/cyclops/util/box/MutableByte.java | 9 ++--- .../oath/cyclops/util/box/MutableChar.java | 9 ++--- .../oath/cyclops/util/box/MutableDouble.java | 9 ++--- .../oath/cyclops/util/box/MutableLong.java | 9 ++--- .../oath/cyclops/util/box/MutableShort.java | 9 ++--- .../scheduling/cron/CronExpression.java | 11 +----- .../src/main/java/cyclops/control/Try.java | 4 +- .../src/main/java/cyclops/data/TreeMap.java | 4 +- .../src/main/java/cyclops/data/Zipper.java | 4 +- .../src/main/java/cyclops/data/base/BAMT.java | 1 - .../src/main/java/cyclops/data/base/HAMT.java | 4 +- .../cyclops/data/base/HashedPatriciaTrie.java | 7 ++-- .../cyclops/data/base/IntPatriciaTrie.java | 5 +-- .../java/cyclops/data/base/RedBlackTree.java | 13 +++---- .../main/java/cyclops/data/tuple/Tuple1.java | 2 +- .../cyclops/function/FluentFunctions.java | 12 +++--- .../main/java/cyclops/reactive/Generator.java | 4 +- 139 files changed, 404 insertions(+), 564 deletions(-) diff --git a/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/FutureStreamImpl.java b/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/FutureStreamImpl.java index 40a909427b..789971b43c 100644 --- a/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/FutureStreamImpl.java +++ b/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/FutureStreamImpl.java @@ -39,7 +39,7 @@ import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Getter; -import lombok.experimental.Wither; +import lombok.With; import org.reactivestreams.Subscriber; @@ -47,23 +47,23 @@ @AllArgsConstructor(access = AccessLevel.PRIVATE) public class FutureStreamImpl implements FutureStream { - @Wither + @With private final Optional> errorHandler; private final LazyStreamWrapper lastActive; - @Wither + @With private final Supplier> lazyCollector; - @Wither + @With private final QueueFactory queueFactory; - @Wither + @With private final LazyReact simpleReact; - @Wither + @With private final Continueable subscription; private final static ReactPool pool = ReactPool.elasticPool(() -> new LazyReact( Executors.newSingleThreadExecutor())); - @Wither + @With private final ConsumerHolder error; - @Wither + @With private final MaxActive maxActive; @AllArgsConstructor diff --git a/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/SimpleReactStreamImpl.java b/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/SimpleReactStreamImpl.java index 18f5cdd4bb..d2422fb0ef 100644 --- a/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/SimpleReactStreamImpl.java +++ b/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/SimpleReactStreamImpl.java @@ -21,9 +21,9 @@ import lombok.AllArgsConstructor; import lombok.Getter; -import lombok.experimental.Wither; +import lombok.With; -@Wither +@With @Getter @AllArgsConstructor public class SimpleReactStreamImpl implements SimpleReactStream, EagerToQueue { diff --git a/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/async/future/ExecutionPipeline.java b/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/async/future/ExecutionPipeline.java index cc5e1b1629..2088d89563 100644 --- a/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/async/future/ExecutionPipeline.java +++ b/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/async/future/ExecutionPipeline.java @@ -10,11 +10,11 @@ import cyclops.data.Seq; import lombok.AllArgsConstructor; import lombok.ToString; -import lombok.experimental.Wither; +import lombok.With; @ToString @AllArgsConstructor -@Wither +@With public class ExecutionPipeline { private final Seq functionList; private final Seq execList; diff --git a/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/async/future/PipelineBuilder.java b/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/async/future/PipelineBuilder.java index d90a12562c..6878132f36 100644 --- a/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/async/future/PipelineBuilder.java +++ b/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/async/future/PipelineBuilder.java @@ -10,10 +10,10 @@ import cyclops.function.Memoize; import lombok.AllArgsConstructor; -import lombok.experimental.Wither; +import lombok.With; @AllArgsConstructor -@Wither +@With public class PipelineBuilder { private final ExecutionPipeline builder; diff --git a/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/stream/EagerStreamWrapper.java b/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/stream/EagerStreamWrapper.java index a1bf7ca485..5bac7c249d 100644 --- a/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/stream/EagerStreamWrapper.java +++ b/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/stream/EagerStreamWrapper.java @@ -17,9 +17,9 @@ import com.oath.cyclops.util.ExceptionSoftener; import lombok.AllArgsConstructor; -import lombok.experimental.Wither; +import lombok.With; -@Wither +@With @AllArgsConstructor public class EagerStreamWrapper implements StreamWrapper { @SuppressWarnings("rawtypes") diff --git a/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/stream/LazyStreamWrapper.java b/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/stream/LazyStreamWrapper.java index 55d3a7363c..69bf2c6fcf 100644 --- a/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/stream/LazyStreamWrapper.java +++ b/cyclops-futurestream/src/main/java/com/oath/cyclops/internal/react/stream/LazyStreamWrapper.java @@ -15,13 +15,13 @@ import com.oath.cyclops.internal.react.async.future.FinalPipeline; import lombok.AllArgsConstructor; -import lombok.experimental.Wither; +import lombok.With; @AllArgsConstructor public class LazyStreamWrapper implements StreamWrapper { - @Wither + @With private final Supplier> values; - @Wither + @With private final LazyReact react; private PipelineBuilder pipeline; private final FuturePool pool; diff --git a/cyclops-futurestream/src/main/java/com/oath/cyclops/react/collectors/lazy/EmptyCollector.java b/cyclops-futurestream/src/main/java/com/oath/cyclops/react/collectors/lazy/EmptyCollector.java index 0fd2cf00bf..2e27f268e1 100644 --- a/cyclops-futurestream/src/main/java/com/oath/cyclops/react/collectors/lazy/EmptyCollector.java +++ b/cyclops-futurestream/src/main/java/com/oath/cyclops/react/collectors/lazy/EmptyCollector.java @@ -11,7 +11,7 @@ import lombok.AllArgsConstructor; import lombok.Getter; -import lombok.experimental.Wither; +import lombok.With; /** * A collector that periodically joins active completablefutures @@ -20,7 +20,7 @@ * @author johnmcclean * */ -@Wither +@With @AllArgsConstructor public class EmptyCollector implements LazyResultConsumer { diff --git a/cyclops-futurestream/src/main/java/cyclops/futurestream/LazyReact.java b/cyclops-futurestream/src/main/java/cyclops/futurestream/LazyReact.java index e22dfb545f..fadcb854cf 100644 --- a/cyclops-futurestream/src/main/java/cyclops/futurestream/LazyReact.java +++ b/cyclops-futurestream/src/main/java/cyclops/futurestream/LazyReact.java @@ -22,7 +22,7 @@ import cyclops.data.Seq; import cyclops.reactive.ReactiveSeq; import cyclops.reactive.Spouts; -import lombok.experimental.Wither; +import lombok.With; import org.reactivestreams.Publisher; import com.oath.cyclops.internal.react.FutureStreamImpl; diff --git a/cyclops-futurestream/src/main/java/cyclops/futurestream/SimpleReact.java b/cyclops-futurestream/src/main/java/cyclops/futurestream/SimpleReact.java index 93ba4c23a2..55736e9673 100644 --- a/cyclops-futurestream/src/main/java/cyclops/futurestream/SimpleReact.java +++ b/cyclops-futurestream/src/main/java/cyclops/futurestream/SimpleReact.java @@ -7,7 +7,7 @@ import cyclops.reactive.Spouts; import lombok.Builder; import lombok.Getter; -import lombok.experimental.Wither; +import lombok.With; import org.reactivestreams.Publisher; import java.util.*; @@ -68,7 +68,7 @@ * */ @Builder -@Wither +@With public class SimpleReact implements ReactBuilder { @Getter private final Executor queueService; diff --git a/cyclops-pure/src/main/java/cyclops/instances/control/FutureInstances.java b/cyclops-pure/src/main/java/cyclops/instances/control/FutureInstances.java index 7cb6cc2a52..429164ff81 100644 --- a/cyclops-pure/src/main/java/cyclops/instances/control/FutureInstances.java +++ b/cyclops-pure/src/main/java/cyclops/instances/control/FutureInstances.java @@ -29,7 +29,7 @@ import cyclops.typeclasses.monad.TraverseByTraverse; import lombok.AllArgsConstructor; import lombok.experimental.UtilityClass; -import lombok.experimental.Wither; +import lombok.With; import java.util.function.Function; @@ -132,7 +132,7 @@ public Option> unfoldable() { private final FutureTypeclasses INSTANCE = new FutureTypeclasses(); @AllArgsConstructor - @Wither + @With public static class FutureTypeclasses implements MonadPlus, MonadRec, TraverseByTraverse, diff --git a/cyclops-pure/src/main/java/cyclops/instances/control/OptionInstances.java b/cyclops-pure/src/main/java/cyclops/instances/control/OptionInstances.java index a415aa83e1..d3d5c5e486 100644 --- a/cyclops-pure/src/main/java/cyclops/instances/control/OptionInstances.java +++ b/cyclops-pure/src/main/java/cyclops/instances/control/OptionInstances.java @@ -31,7 +31,7 @@ import cyclops.typeclasses.monad.TraverseByTraverse; import lombok.AllArgsConstructor; import lombok.experimental.UtilityClass; -import lombok.experimental.Wither; +import lombok.With; import java.util.function.Function; @@ -145,7 +145,7 @@ public Option> unfoldable() { private final OptionTypeclasses INSTANCE = new OptionTypeclasses(); @AllArgsConstructor - @Wither + @With public static class OptionTypeclasses implements MonadPlus