Skip to content

Commit

Permalink
Round of deprecation removals and misc cleanups ahead of 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jponge committed Jan 4, 2022
1 parent 4577875 commit 92d3b10
Show file tree
Hide file tree
Showing 28 changed files with 241 additions and 480 deletions.
250 changes: 174 additions & 76 deletions implementation/revapi.json
Original file line number Diff line number Diff line change
@@ -1,79 +1,177 @@
[ {
"extension" : "revapi.java",
"id" : "java",
"configuration" : {
"missing-classes" : {
"behavior" : "report",
"ignoreMissingAnnotations" : false
},
"filter" : {
"packages" : {
"regex" : true,
"include" : [ "io\\.smallrye\\.mutiny(\\..+)?" ],
"exclude" : [ "io\\.smallrye\\.mutiny\\.operators(\\..+)?" ]
}
}
}
}, {
"extension" : "revapi.differences",
"id" : "breaking-changes",
"configuration" : {
"criticality" : "highlight",
"minSeverity" : "POTENTIALLY_BREAKING",
"minCriticality" : "documented",
"differences" : [
{
"ignore": true,
"code": "java.method.numberOfParametersChanged",
"old": "method void io.smallrye.mutiny.groups.UniAwait<T>::<init>(io.smallrye.mutiny.Uni<T>)",
"new": "method void io.smallrye.mutiny.groups.UniAwait<T>::<init>(io.smallrye.mutiny.Uni<T>, io.smallrye.mutiny.Context)",
"justification": "Private API impacted by the new Mutiny context support"
},
{
"ignore": true,
"code": "java.method.numberOfParametersChanged",
"old": "method void io.smallrye.mutiny.groups.UniAwaitOptional<T>::<init>(io.smallrye.mutiny.Uni<T>)",
"new": "method void io.smallrye.mutiny.groups.UniAwaitOptional<T>::<init>(io.smallrye.mutiny.Uni<T>, io.smallrye.mutiny.Context)",
"justification": "Private API impacted by the new Mutiny context support"
},
{
"ignore": true,
"code": "java.method.numberOfParametersChanged",
"old": "method void io.smallrye.mutiny.helpers.BlockingIterable<T>::<init>(org.reactivestreams.Publisher<? extends T>, int, java.util.function.Supplier<java.util.Queue<T>>)",
"new": "method void io.smallrye.mutiny.helpers.BlockingIterable<T>::<init>(io.smallrye.mutiny.Multi<? extends T>, int, java.util.function.Supplier<java.util.Queue<T>>, java.util.function.Supplier<io.smallrye.mutiny.Context>)",
"justification": "Private API impacted by the new Mutiny context support"
},
{
"ignore": true,
"code": "java.method.numberOfParametersChanged",
"old": "method void io.smallrye.mutiny.helpers.UniCallbackSubscriber<T>::<init>(java.util.function.Consumer<? super T>, java.util.function.Consumer<? super java.lang.Throwable>)",
"new": "method void io.smallrye.mutiny.helpers.UniCallbackSubscriber<T>::<init>(java.util.function.Consumer<? super T>, java.util.function.Consumer<? super java.lang.Throwable>, io.smallrye.mutiny.Context)",
"justification": "Private API impacted by the new Mutiny context support"
[
{
"extension": "revapi.java",
"id": "java",
"configuration": {
"missing-classes": {
"behavior": "report",
"ignoreMissingAnnotations": false
},
{
"ignore": true,
"code": "java.method.numberOfParametersChanged",
"old": "method void io.smallrye.mutiny.subscription.Subscribers.CallbackBasedSubscriber<T>::<init>(java.util.function.Consumer<? super T>, java.util.function.Consumer<? super java.lang.Throwable>, java.lang.Runnable, java.util.function.Consumer<? super org.reactivestreams.Subscription>)",
"new": "method void io.smallrye.mutiny.subscription.Subscribers.CallbackBasedSubscriber<T>::<init>(io.smallrye.mutiny.Context, java.util.function.Consumer<? super T>, java.util.function.Consumer<? super java.lang.Throwable>, java.lang.Runnable, java.util.function.Consumer<? super org.reactivestreams.Subscription>)",
"justification": "Private API impacted by the new Mutiny context support"
},
{
"ignore": true,
"code": "java.method.numberOfParametersChanged",
"old": "method <T> io.smallrye.mutiny.subscription.CancellableSubscriber<T> io.smallrye.mutiny.subscription.Subscribers::from(java.util.function.Consumer<? super T>, java.util.function.Consumer<? super java.lang.Throwable>, java.lang.Runnable, java.util.function.Consumer<? super org.reactivestreams.Subscription>)",
"new": "method <T> io.smallrye.mutiny.subscription.CancellableSubscriber<T> io.smallrye.mutiny.subscription.Subscribers::from(io.smallrye.mutiny.Context, java.util.function.Consumer<? super T>, java.util.function.Consumer<? super java.lang.Throwable>, java.lang.Runnable, java.util.function.Consumer<? super org.reactivestreams.Subscription>)",
"justification": "Private API impacted by the new Mutiny context support"
"filter": {
"packages": {
"regex": true,
"include": [
"io\\.smallrye\\.mutiny(\\..+)?"
],
"exclude": [
"io\\.smallrye\\.mutiny\\.operators(\\..+)?"
]
}
}
]
}
}, {
"extension" : "revapi.reporter.json",
"configuration" : {
"minSeverity" : "POTENTIALLY_BREAKING",
"minCriticality" : "documented",
"output" : "target/compatibility.json",
"indent" : true,
"append" : false,
"keepEmptyFile" : true
}
},
{
"extension": "revapi.differences",
"id": "breaking-changes",
"configuration": {
"criticality": "highlight",
"minSeverity": "POTENTIALLY_BREAKING",
"minCriticality": "documented",
"differences": [
{
"ignore": true,
"code": "java.method.numberOfParametersChanged",
"old": "method void io.smallrye.mutiny.groups.UniAwait<T>::<init>(io.smallrye.mutiny.Uni<T>)",
"new": "method void io.smallrye.mutiny.groups.UniAwait<T>::<init>(io.smallrye.mutiny.Uni<T>, io.smallrye.mutiny.Context)",
"justification": "Private API impacted by the new Mutiny context support"
},
{
"ignore": true,
"code": "java.method.numberOfParametersChanged",
"old": "method void io.smallrye.mutiny.groups.UniAwaitOptional<T>::<init>(io.smallrye.mutiny.Uni<T>)",
"new": "method void io.smallrye.mutiny.groups.UniAwaitOptional<T>::<init>(io.smallrye.mutiny.Uni<T>, io.smallrye.mutiny.Context)",
"justification": "Private API impacted by the new Mutiny context support"
},
{
"ignore": true,
"code": "java.method.numberOfParametersChanged",
"old": "method void io.smallrye.mutiny.helpers.BlockingIterable<T>::<init>(org.reactivestreams.Publisher<? extends T>, int, java.util.function.Supplier<java.util.Queue<T>>)",
"new": "method void io.smallrye.mutiny.helpers.BlockingIterable<T>::<init>(io.smallrye.mutiny.Multi<? extends T>, int, java.util.function.Supplier<java.util.Queue<T>>, java.util.function.Supplier<io.smallrye.mutiny.Context>)",
"justification": "Private API impacted by the new Mutiny context support"
},
{
"ignore": true,
"code": "java.method.numberOfParametersChanged",
"old": "method void io.smallrye.mutiny.helpers.UniCallbackSubscriber<T>::<init>(java.util.function.Consumer<? super T>, java.util.function.Consumer<? super java.lang.Throwable>)",
"new": "method void io.smallrye.mutiny.helpers.UniCallbackSubscriber<T>::<init>(java.util.function.Consumer<? super T>, java.util.function.Consumer<? super java.lang.Throwable>, io.smallrye.mutiny.Context)",
"justification": "Private API impacted by the new Mutiny context support"
},
{
"ignore": true,
"code": "java.method.numberOfParametersChanged",
"old": "method void io.smallrye.mutiny.subscription.Subscribers.CallbackBasedSubscriber<T>::<init>(java.util.function.Consumer<? super T>, java.util.function.Consumer<? super java.lang.Throwable>, java.lang.Runnable, java.util.function.Consumer<? super org.reactivestreams.Subscription>)",
"new": "method void io.smallrye.mutiny.subscription.Subscribers.CallbackBasedSubscriber<T>::<init>(io.smallrye.mutiny.Context, java.util.function.Consumer<? super T>, java.util.function.Consumer<? super java.lang.Throwable>, java.lang.Runnable, java.util.function.Consumer<? super org.reactivestreams.Subscription>)",
"justification": "Private API impacted by the new Mutiny context support"
},
{
"ignore": true,
"code": "java.method.numberOfParametersChanged",
"old": "method <T> io.smallrye.mutiny.subscription.CancellableSubscriber<T> io.smallrye.mutiny.subscription.Subscribers::from(java.util.function.Consumer<? super T>, java.util.function.Consumer<? super java.lang.Throwable>, java.lang.Runnable, java.util.function.Consumer<? super org.reactivestreams.Subscription>)",
"new": "method <T> io.smallrye.mutiny.subscription.CancellableSubscriber<T> io.smallrye.mutiny.subscription.Subscribers::from(io.smallrye.mutiny.Context, java.util.function.Consumer<? super T>, java.util.function.Consumer<? super java.lang.Throwable>, java.lang.Runnable, java.util.function.Consumer<? super org.reactivestreams.Subscription>)",
"justification": "Private API impacted by the new Mutiny context support"
},
{
"ignore": true,
"code": "java.method.removed",
"old": "method io.smallrye.mutiny.groups.MultiCollect<T> io.smallrye.mutiny.Multi<T>::collectItems()",
"justification": "Deprecated API removal (~1 year old)"
},
{
"ignore": true,
"code": "java.method.removed",
"old": "method io.smallrye.mutiny.groups.MultiGroup<T> io.smallrye.mutiny.Multi<T>::groupItems()",
"justification": "Deprecated API removal (~1 year old)"
},
{
"ignore": true,
"code": "java.method.removed",
"old": "method io.smallrye.mutiny.groups.MultiTransform<T> io.smallrye.mutiny.Multi<T>::transform()",
"justification": "Deprecated API removal (~1 year old)"
},
{
"ignore": true,
"code": "java.method.removed",
"old": "method io.smallrye.mutiny.Uni<T> io.smallrye.mutiny.Uni<T>::cache()",
"justification": "Deprecated API removal (~1 year old)"
},
{
"ignore": true,
"code": "java.method.removed",
"old": "method io.smallrye.mutiny.Multi<T> io.smallrye.mutiny.groups.MultiOverflow<T>::drop(java.util.function.Consumer<T>)",
"justification": "Deprecated API removal (~1 year old)"
},
{
"ignore": true,
"code": "java.class.removed",
"old": "class io.smallrye.mutiny.groups.MultiTransform<T>",
"justification": "Deprecated API removal (~1 year old)"
},
{
"ignore": true,
"code": "java.method.removed",
"old": "method io.smallrye.mutiny.groups.MultiTransform<T> io.smallrye.mutiny.operators.AbstractMulti<T>::transform() @ io.smallrye.mutiny.helpers.spies.MultiGlobalSpy<T>",
"justification": "Deprecated API removal (~1 year old)"
},
{
"ignore": true,
"code": "java.method.removed",
"old": "method io.smallrye.mutiny.groups.MultiTransform<T> io.smallrye.mutiny.operators.AbstractMulti<T>::transform() @ io.smallrye.mutiny.helpers.spies.MultiOnCancellationSpy<T>",
"justification": "Deprecated API removal (~1 year old)"
},
{
"ignore": true,
"code": "java.method.removed",
"old": "method io.smallrye.mutiny.groups.MultiTransform<T> io.smallrye.mutiny.operators.AbstractMulti<T>::transform() @ io.smallrye.mutiny.helpers.spies.MultiOnCompletionSpy<T>",
"justification": "Deprecated API removal (~1 year old)"
},
{
"ignore": true,
"code": "java.method.removed",
"old": "method io.smallrye.mutiny.groups.MultiTransform<T> io.smallrye.mutiny.operators.AbstractMulti<T>::transform() @ io.smallrye.mutiny.helpers.spies.MultiOnFailureSpy<T>",
"justification": "Deprecated API removal (~1 year old)"
},
{
"ignore": true,
"code": "java.method.removed",
"old": "method io.smallrye.mutiny.groups.MultiTransform<T> io.smallrye.mutiny.operators.AbstractMulti<T>::transform() @ io.smallrye.mutiny.helpers.spies.MultiOnItemSpy<T>",
"justification": "Deprecated API removal (~1 year old)"
},
{
"ignore": true,
"code": "java.method.removed",
"old": "method io.smallrye.mutiny.groups.MultiTransform<T> io.smallrye.mutiny.operators.AbstractMulti<T>::transform() @ io.smallrye.mutiny.helpers.spies.MultiOnOverflowSpy<T>",
"justification": "Deprecated API removal (~1 year old)"
},
{
"ignore": true,
"code": "java.method.removed",
"old": "method io.smallrye.mutiny.groups.MultiTransform<T> io.smallrye.mutiny.operators.AbstractMulti<T>::transform() @ io.smallrye.mutiny.helpers.spies.MultiOnRequestSpy<T>",
"justification": "Deprecated API removal (~1 year old)"
},
{
"ignore": true,
"code": "java.method.removed",
"old": "method io.smallrye.mutiny.groups.MultiTransform<T> io.smallrye.mutiny.operators.AbstractMulti<T>::transform() @ io.smallrye.mutiny.helpers.spies.MultiOnSubscribeSpy<T>",
"justification": "Deprecated API removal (~1 year old)"
},
{
"ignore": true,
"code": "java.method.removed",
"old": "method io.smallrye.mutiny.groups.MultiTransform<T> io.smallrye.mutiny.operators.AbstractMulti<T>::transform() @ io.smallrye.mutiny.helpers.spies.MultiOnTerminationSpy<T>",
"justification": "Deprecated API removal (~1 year old)"
}
]
}
},
{
"extension": "revapi.reporter.json",
"configuration": {
"minSeverity": "POTENTIALLY_BREAKING",
"minCriticality": "documented",
"output": "target/compatibility.json",
"indent": true,
"append": false,
"keepEmptyFile": true
}
}
} ]
]
46 changes: 0 additions & 46 deletions implementation/src/main/java/io/smallrye/mutiny/Multi.java
Original file line number Diff line number Diff line change
Expand Up @@ -203,28 +203,6 @@ default <O> O stage(Function<Multi<T>, O> stage) {
@CheckReturnValue
Multi<T> cache();

/**
* Produces {@link Uni} collecting/aggregating items from this {@link Multi}.
* It allows accumulating the items emitted by this {@code multi} into a structure such as a into a
* {@link java.util.List} ({@link MultiCollect#asList()}), a {@link java.util.Map}
* ({@link MultiCollect#asMap(Function)}, or a custom collector.
* When this {@code multi} sends the completion signal, the structure is emitted by the returned {@link Uni}.
* <p>
* If this {@link Multi} emits a failure, the produced {@link Uni} produces the same failure and the aggregated items
* are discarded.
* <p>
* You can also retrieve the first and last items using {@link MultiCollect#first()} and {@link MultiCollect#last()}.
* Be aware to not used method collecting items on unbounded / infinite {@link Multi}.
*
* @return the object to configure the collection process.
* @deprecated Use {@link #collect()} instead
*/
@Deprecated
@CheckReturnValue
default MultiCollect<T> collectItems() {
return collect();
}

/**
* Produces {@link Uni} collecting/aggregating items from this {@link Multi}.
* It allows accumulating the items emitted by this {@code multi} into a structure such as a into a
Expand Down Expand Up @@ -253,20 +231,6 @@ default MultiCollect<T> collectItems() {
@CheckReturnValue
MultiGroup<T> group();

/**
* Produces {@link Multi} grouping items from this {@link Multi} into various "form of chunks" (list, {@link Multi}).
* The grouping can be done linearly ({@link MultiGroup#intoLists()} and {@link MultiGroup#intoMultis()}, or based
* on a grouping function ({@link MultiGroup#by(Function)})
*
* @return the object to configure the grouping.
* @deprecated Use {@link #group()} instead
*/
@Deprecated
@CheckReturnValue
default MultiGroup<T> groupItems() {
return group();
}

/**
* Produces a new {@link Multi} invoking the {@code onItem}, {@code onFailure} and {@code onCompletion} methods
* on the supplied {@link Executor}.
Expand Down Expand Up @@ -301,16 +265,6 @@ default MultiGroup<T> groupItems() {
@CheckReturnValue
MultiOnCompletion<T> onCompletion();

/**
* Transforms the streams by skipping, selecting, or merging.
*
* @return the object to configure the transformation.
* @deprecated Use {@link #select()} and {@link #skip()}instead
*/
@Deprecated
@CheckReturnValue
MultiTransform<T> transform();

/**
* Selects items from this {@link Multi}.
*
Expand Down
13 changes: 0 additions & 13 deletions implementation/src/main/java/io/smallrye/mutiny/Uni.java
Original file line number Diff line number Diff line change
Expand Up @@ -371,19 +371,6 @@ default UniAwait<T> awaitUsing(Context context) {
@CheckReturnValue
UniMemoize<T> memoize();

/**
* Caches the events (item or failure) of this {@link Uni} and replays it for all further {@link UniSubscriber}.
*
* @return the new {@link Uni}. Unlike regular {@link Uni}, re-subscribing to this {@link Uni} does not re-compute
* the outcome but replayed the cached events.
* @deprecated Use {@link UniMemoize#indefinitely()} instead
*/
@Deprecated
@CheckReturnValue
default Uni<T> cache() {
return memoize().indefinitely();
}

/**
* Transforms the item (potentially null) emitted by this {@link Uni} by applying a (synchronous) function to it.
* This method is equivalent to {@code uni.onItem().transform(x -> ...)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,6 @@ public Multi<T> drop() {
return new MultiOverflowStrategy<>(upstream, null, null).drop();
}

/**
* When the downstream cannot keep up with the upstream emissions, instruct to drop the item.
*
* @param callback a callback invoked when an item is dropped. The callback receives the item. Must not be
* {@code null}
* @return the new multi
* @deprecated Use {@link Multi#invoke(Consumer)} and {@link MultiOverflowStrategy#drop()} as in
* {@code multi.onOverflow().invoke(consumer).drop()}.
*/
@Deprecated
@CheckReturnValue
public Multi<T> drop(Consumer<T> callback) {
Consumer<T> actual = Infrastructure.decorate(nonNull(callback, "callback"));
return new MultiOverflowStrategy<>(upstream, actual, null).drop();
}

/**
* When the downstream cannot keep up with the upstream emissions, instruct to drop all previously buffered items.
*
Expand Down
Loading

0 comments on commit 92d3b10

Please sign in to comment.