mirror of
https://github.com/jlengrand/error-prone-support.git
synced 2026-03-10 08:11:25 +00:00
Compare commits
3 Commits
v0.11.1
...
release/0.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2883668a1e | ||
|
|
7f95bd9a25 | ||
|
|
a7ecfb7177 |
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>tech.picnic.error-prone-support</groupId>
|
||||
<artifactId>error-prone-support</artifactId>
|
||||
<version>0.1.1-SNAPSHOT</version>
|
||||
<version>0.1.1-alpha-snapshot</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>error-prone-contrib</artifactId>
|
||||
@@ -128,11 +128,6 @@
|
||||
<artifactId>jaxb-api</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.aspectj</groupId>
|
||||
<artifactId>aspectjweaver</artifactId>
|
||||
|
||||
@@ -9,7 +9,6 @@ import io.reactivex.Flowable;
|
||||
import io.reactivex.Maybe;
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.Single;
|
||||
import org.reactivestreams.Publisher;
|
||||
import reactor.adapter.rxjava.RxJava2Adapter;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
@@ -39,12 +38,12 @@ final class RxJava2AdapterTemplates {
|
||||
*/
|
||||
static final class FlowableToFlux<T> {
|
||||
@BeforeTemplate
|
||||
Publisher<T> before(Flowable<T> flowable) {
|
||||
Flux<T> before(Flowable<T> flowable) {
|
||||
return Refaster.anyOf(
|
||||
flowable.compose(Flux::from),
|
||||
Flux.from(flowable),
|
||||
flowable.to(Flux::from),
|
||||
flowable.as(Flux::from),
|
||||
flowable.compose(RxJava2Adapter::flowableToFlux),
|
||||
RxJava2Adapter.flowableToFlux(flowable),
|
||||
flowable.to(RxJava2Adapter::flowableToFlux));
|
||||
}
|
||||
|
||||
@@ -60,12 +59,11 @@ final class RxJava2AdapterTemplates {
|
||||
*/
|
||||
static final class FluxToFlowable<T> {
|
||||
@BeforeTemplate
|
||||
Publisher<T> before(Flux<T> flux) {
|
||||
Flowable<T> before(Flux<T> flux) {
|
||||
return Refaster.anyOf(
|
||||
Flowable.fromPublisher(flux),
|
||||
flux.transform(Flowable::fromPublisher),
|
||||
flux.as(Flowable::fromPublisher),
|
||||
flux.transform(RxJava2Adapter::fluxToFlowable));
|
||||
RxJava2Adapter.fluxToFlowable(flux));
|
||||
}
|
||||
|
||||
@AfterTemplate
|
||||
@@ -132,12 +130,11 @@ final class RxJava2AdapterTemplates {
|
||||
*/
|
||||
static final class MonoToFlowable<T> {
|
||||
@BeforeTemplate
|
||||
Publisher<T> before(Mono<T> mono) {
|
||||
Flowable<T> before(Mono<T> mono) {
|
||||
return Refaster.anyOf(
|
||||
Flowable.fromPublisher(mono),
|
||||
mono.transform(Flowable::fromPublisher),
|
||||
mono.as(Flowable::fromPublisher),
|
||||
mono.transform(RxJava2Adapter::monoToFlowable));
|
||||
RxJava2Adapter.monoToFlowable(mono));
|
||||
}
|
||||
|
||||
@AfterTemplate
|
||||
|
||||
@@ -7,8 +7,6 @@ import io.reactivex.Flowable;
|
||||
import io.reactivex.Maybe;
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.Single;
|
||||
import java.util.Arrays;
|
||||
import org.reactivestreams.Publisher;
|
||||
import reactor.adapter.rxjava.RxJava2Adapter;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
@@ -21,24 +19,20 @@ final class RxJava2AdapterTemplatesTest implements RefasterTemplateTestCase {
|
||||
Completable.complete().to(RxJava2Adapter::completableToMono));
|
||||
}
|
||||
|
||||
ImmutableSet<Publisher<Integer>> testFlowableToFlux() {
|
||||
// The `Arrays.asList` is to avoid confusing `javac`; `ImmutableSet.of` uses varargs from the
|
||||
// seventh parameter onwards.
|
||||
return ImmutableSet.copyOf(
|
||||
Arrays.asList(
|
||||
Flowable.just(1).compose(Flux::from),
|
||||
Flowable.just(2).to(Flux::from),
|
||||
Flowable.just(3).as(Flux::from),
|
||||
Flowable.just(4).compose(RxJava2Adapter::flowableToFlux),
|
||||
Flowable.just(5).<Publisher<Integer>>to(RxJava2Adapter::flowableToFlux)));
|
||||
ImmutableSet<Flux<Integer>> testFlowableToFlux() {
|
||||
return ImmutableSet.of(
|
||||
Flux.from(Flowable.just(1)),
|
||||
Flowable.just(2).to(Flux::from),
|
||||
Flowable.just(3).as(Flux::from),
|
||||
RxJava2Adapter.flowableToFlux(Flowable.just(4)),
|
||||
Flowable.just(5).to(RxJava2Adapter::flowableToFlux));
|
||||
}
|
||||
|
||||
ImmutableSet<Publisher<String>> testFluxToFlowable() {
|
||||
ImmutableSet<Flowable<String>> testFluxToFlowable() {
|
||||
return ImmutableSet.of(
|
||||
Flowable.fromPublisher(Flux.just("foo")),
|
||||
Flux.just("bar").transform(Flowable::fromPublisher),
|
||||
Flux.just("baz").as(Flowable::fromPublisher),
|
||||
Flux.just("qux").transform(RxJava2Adapter::fluxToFlowable));
|
||||
Flux.just("bar").as(Flowable::fromPublisher),
|
||||
RxJava2Adapter.fluxToFlowable(Flux.just("baz")));
|
||||
}
|
||||
|
||||
ImmutableSet<Observable<Integer>> testFluxToObservable() {
|
||||
@@ -61,12 +55,11 @@ final class RxJava2AdapterTemplatesTest implements RefasterTemplateTestCase {
|
||||
RxJava2Adapter.monoToCompletable(Mono.empty()));
|
||||
}
|
||||
|
||||
ImmutableSet<Publisher<Integer>> testMonoToFlowable() {
|
||||
ImmutableSet<Flowable<Integer>> testMonoToFlowable() {
|
||||
return ImmutableSet.of(
|
||||
Flowable.fromPublisher(Mono.just(1)),
|
||||
Mono.just(2).transform(Flowable::fromPublisher),
|
||||
Mono.just(3).as(Flowable::fromPublisher),
|
||||
Mono.just(4).transform(RxJava2Adapter::monoToFlowable));
|
||||
Mono.just(2).as(Flowable::fromPublisher),
|
||||
RxJava2Adapter.monoToFlowable(Mono.just(3)));
|
||||
}
|
||||
|
||||
Maybe<String> testMonoToMaybe() {
|
||||
|
||||
@@ -7,8 +7,6 @@ import io.reactivex.Flowable;
|
||||
import io.reactivex.Maybe;
|
||||
import io.reactivex.Observable;
|
||||
import io.reactivex.Single;
|
||||
import java.util.Arrays;
|
||||
import org.reactivestreams.Publisher;
|
||||
import reactor.adapter.rxjava.RxJava2Adapter;
|
||||
import reactor.core.publisher.Flux;
|
||||
import reactor.core.publisher.Mono;
|
||||
@@ -21,24 +19,20 @@ final class RxJava2AdapterTemplatesTest implements RefasterTemplateTestCase {
|
||||
Completable.complete().as(RxJava2Adapter::completableToMono));
|
||||
}
|
||||
|
||||
ImmutableSet<Publisher<Integer>> testFlowableToFlux() {
|
||||
// The `Arrays.asList` is to avoid confusing `javac`; `ImmutableSet.of` uses varargs from the
|
||||
// seventh parameter onwards.
|
||||
return ImmutableSet.copyOf(
|
||||
Arrays.asList(
|
||||
Flowable.just(1).as(RxJava2Adapter::flowableToFlux),
|
||||
Flowable.just(2).as(RxJava2Adapter::flowableToFlux),
|
||||
Flowable.just(3).as(RxJava2Adapter::flowableToFlux),
|
||||
Flowable.just(4).as(RxJava2Adapter::flowableToFlux),
|
||||
Flowable.just(5).as(RxJava2Adapter::flowableToFlux)));
|
||||
ImmutableSet<Flux<Integer>> testFlowableToFlux() {
|
||||
return ImmutableSet.of(
|
||||
Flowable.just(1).as(RxJava2Adapter::flowableToFlux),
|
||||
Flowable.just(2).as(RxJava2Adapter::flowableToFlux),
|
||||
Flowable.just(3).as(RxJava2Adapter::flowableToFlux),
|
||||
Flowable.just(4).as(RxJava2Adapter::flowableToFlux),
|
||||
Flowable.just(5).as(RxJava2Adapter::flowableToFlux));
|
||||
}
|
||||
|
||||
ImmutableSet<Publisher<String>> testFluxToFlowable() {
|
||||
ImmutableSet<Flowable<String>> testFluxToFlowable() {
|
||||
return ImmutableSet.of(
|
||||
Flux.just("foo").as(RxJava2Adapter::fluxToFlowable),
|
||||
Flux.just("bar").as(RxJava2Adapter::fluxToFlowable),
|
||||
Flux.just("baz").as(RxJava2Adapter::fluxToFlowable),
|
||||
Flux.just("qux").as(RxJava2Adapter::fluxToFlowable));
|
||||
Flux.just("baz").as(RxJava2Adapter::fluxToFlowable));
|
||||
}
|
||||
|
||||
ImmutableSet<Observable<Integer>> testFluxToObservable() {
|
||||
@@ -61,12 +55,11 @@ final class RxJava2AdapterTemplatesTest implements RefasterTemplateTestCase {
|
||||
Mono.empty().as(RxJava2Adapter::monoToCompletable));
|
||||
}
|
||||
|
||||
ImmutableSet<Publisher<Integer>> testMonoToFlowable() {
|
||||
ImmutableSet<Flowable<Integer>> testMonoToFlowable() {
|
||||
return ImmutableSet.of(
|
||||
Mono.just(1).as(RxJava2Adapter::monoToFlowable),
|
||||
Mono.just(2).as(RxJava2Adapter::monoToFlowable),
|
||||
Mono.just(3).as(RxJava2Adapter::monoToFlowable),
|
||||
Mono.just(4).as(RxJava2Adapter::monoToFlowable));
|
||||
Mono.just(3).as(RxJava2Adapter::monoToFlowable));
|
||||
}
|
||||
|
||||
Maybe<String> testMonoToMaybe() {
|
||||
|
||||
15
pom.xml
15
pom.xml
@@ -4,7 +4,7 @@
|
||||
|
||||
<groupId>tech.picnic.error-prone-support</groupId>
|
||||
<artifactId>error-prone-support</artifactId>
|
||||
<version>0.1.1-SNAPSHOT</version>
|
||||
<version>0.1.1-alpha-snapshot</version>
|
||||
<packaging>pom</packaging>
|
||||
|
||||
<name>Picnic :: Error Prone Support</name>
|
||||
@@ -147,7 +147,6 @@
|
||||
<version.error-prone-fork>v${version.error-prone-orig}-picnic-2</version.error-prone-fork>
|
||||
<version.error-prone-orig>2.14.0</version.error-prone-orig>
|
||||
<version.error-prone-slf4j>0.1.13</version.error-prone-slf4j>
|
||||
<version.findbugs-format-string>3.0.0</version.findbugs-format-string>
|
||||
<version.guava-beta-checker>1.0</version.guava-beta-checker>
|
||||
<version.jdk>11</version.jdk>
|
||||
<version.maven>3.8.6</version.maven>
|
||||
@@ -240,13 +239,6 @@
|
||||
<artifactId>auto-value-annotations</artifactId>
|
||||
<version>${version.auto-value}</version>
|
||||
</dependency>
|
||||
<!-- Specified as a workaround for
|
||||
https://github.com/mojohaus/versions-maven-plugin/issues/244. -->
|
||||
<dependency>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>jFormatString</artifactId>
|
||||
<version>${version.findbugs-format-string}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>jsr305</artifactId>
|
||||
@@ -405,11 +397,6 @@
|
||||
<type>pom</type>
|
||||
<scope>import</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.reactivestreams</groupId>
|
||||
<artifactId>reactive-streams</artifactId>
|
||||
<version>1.0.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.slf4j</groupId>
|
||||
<artifactId>slf4j-api</artifactId>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>tech.picnic.error-prone-support</groupId>
|
||||
<artifactId>error-prone-support</artifactId>
|
||||
<version>0.1.1-SNAPSHOT</version>
|
||||
<version>0.1.1-alpha-snapshot</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>refaster-compiler</artifactId>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>tech.picnic.error-prone-support</groupId>
|
||||
<artifactId>error-prone-support</artifactId>
|
||||
<version>0.1.1-SNAPSHOT</version>
|
||||
<version>0.1.1-alpha-snapshot</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>refaster-runner</artifactId>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>tech.picnic.error-prone-support</groupId>
|
||||
<artifactId>error-prone-support</artifactId>
|
||||
<version>0.1.1-SNAPSHOT</version>
|
||||
<version>0.1.1-alpha-snapshot</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>refaster-support</artifactId>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<groupId>tech.picnic.error-prone-support</groupId>
|
||||
<artifactId>error-prone-support</artifactId>
|
||||
<version>0.1.1-SNAPSHOT</version>
|
||||
<version>0.1.1-alpha-snapshot</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>refaster-test-support</artifactId>
|
||||
|
||||
Reference in New Issue
Block a user