Merge branch '5.1.x'
This commit is contained in:
commit
8a33ef2d14
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2018 the original author or authors.
|
* Copyright 2002-2019 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -83,13 +83,6 @@ public class ReactiveAdapter {
|
||||||
return getDescriptor().isMultiValue();
|
return getDescriptor().isMultiValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Shortcut for {@code getDescriptor().supportsEmpty()}.
|
|
||||||
*/
|
|
||||||
public boolean supportsEmpty() {
|
|
||||||
return getDescriptor().supportsEmpty();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shortcut for {@code getDescriptor().isNoValue()}.
|
* Shortcut for {@code getDescriptor().isNoValue()}.
|
||||||
*/
|
*/
|
||||||
|
@ -97,6 +90,13 @@ public class ReactiveAdapter {
|
||||||
return getDescriptor().isNoValue();
|
return getDescriptor().isNoValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Shortcut for {@code getDescriptor().supportsEmpty()}.
|
||||||
|
*/
|
||||||
|
public boolean supportsEmpty() {
|
||||||
|
return getDescriptor().supportsEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adapt the given instance to a Reactive Streams {@code Publisher}.
|
* Adapt the given instance to a Reactive Streams {@code Publisher}.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2018 the original author or authors.
|
* Copyright 2002-2019 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -23,7 +23,7 @@ import org.springframework.util.Assert;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Describes the semantics of a reactive type including boolean checks for
|
* Describes the semantics of a reactive type including boolean checks for
|
||||||
* {@link #isMultiValue()}, {@link #supportsEmpty()}, and {@link #isNoValue()}.
|
* {@link #isMultiValue()}, {@link #isNoValue()}, and {@link #supportsEmpty()}.
|
||||||
*
|
*
|
||||||
* @author Rossen Stoyanchev
|
* @author Rossen Stoyanchev
|
||||||
* @since 5.0
|
* @since 5.0
|
||||||
|
@ -32,25 +32,25 @@ public final class ReactiveTypeDescriptor {
|
||||||
|
|
||||||
private final Class<?> reactiveType;
|
private final Class<?> reactiveType;
|
||||||
|
|
||||||
@Nullable
|
|
||||||
private final Supplier<?> emptyValueSupplier;
|
|
||||||
|
|
||||||
private final boolean multiValue;
|
private final boolean multiValue;
|
||||||
|
|
||||||
private final boolean noValue;
|
private final boolean noValue;
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
private final Supplier<?> emptyValueSupplier;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Private constructor. See static factory methods.
|
* Private constructor. See static factory methods.
|
||||||
*/
|
*/
|
||||||
private ReactiveTypeDescriptor(Class<?> reactiveType, @Nullable Supplier<?> emptySupplier,
|
private ReactiveTypeDescriptor(Class<?> reactiveType, boolean multiValue, boolean noValue,
|
||||||
boolean multiValue, boolean noValue) {
|
@Nullable Supplier<?> emptySupplier) {
|
||||||
|
|
||||||
Assert.notNull(reactiveType, "'reactiveType' must not be null");
|
Assert.notNull(reactiveType, "'reactiveType' must not be null");
|
||||||
this.reactiveType = reactiveType;
|
this.reactiveType = reactiveType;
|
||||||
this.emptyValueSupplier = emptySupplier;
|
|
||||||
this.multiValue = multiValue;
|
this.multiValue = multiValue;
|
||||||
this.noValue = noValue;
|
this.noValue = noValue;
|
||||||
|
this.emptyValueSupplier = emptySupplier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -71,13 +71,6 @@ public final class ReactiveTypeDescriptor {
|
||||||
return this.multiValue;
|
return this.multiValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Return {@code true} if the reactive type can complete with no values.
|
|
||||||
*/
|
|
||||||
public boolean supportsEmpty() {
|
|
||||||
return (this.emptyValueSupplier != null);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return {@code true} if the reactive type does not produce any values and
|
* Return {@code true} if the reactive type does not produce any values and
|
||||||
* only provides completion and error signals.
|
* only provides completion and error signals.
|
||||||
|
@ -86,6 +79,13 @@ public final class ReactiveTypeDescriptor {
|
||||||
return this.noValue;
|
return this.noValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return {@code true} if the reactive type can complete with no values.
|
||||||
|
*/
|
||||||
|
public boolean supportsEmpty() {
|
||||||
|
return (this.emptyValueSupplier != null);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return an empty-value instance for the underlying reactive or async type.
|
* Return an empty-value instance for the underlying reactive or async type.
|
||||||
* Use of this type implies {@link #supportsEmpty()} is true.
|
* Use of this type implies {@link #supportsEmpty()} is true.
|
||||||
|
@ -119,7 +119,7 @@ public final class ReactiveTypeDescriptor {
|
||||||
* @param emptySupplier a supplier of an empty-value instance of the reactive type
|
* @param emptySupplier a supplier of an empty-value instance of the reactive type
|
||||||
*/
|
*/
|
||||||
public static ReactiveTypeDescriptor multiValue(Class<?> type, Supplier<?> emptySupplier) {
|
public static ReactiveTypeDescriptor multiValue(Class<?> type, Supplier<?> emptySupplier) {
|
||||||
return new ReactiveTypeDescriptor(type, emptySupplier, true, false);
|
return new ReactiveTypeDescriptor(type, true, false, emptySupplier);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -128,7 +128,7 @@ public final class ReactiveTypeDescriptor {
|
||||||
* @param emptySupplier a supplier of an empty-value instance of the reactive type
|
* @param emptySupplier a supplier of an empty-value instance of the reactive type
|
||||||
*/
|
*/
|
||||||
public static ReactiveTypeDescriptor singleOptionalValue(Class<?> type, Supplier<?> emptySupplier) {
|
public static ReactiveTypeDescriptor singleOptionalValue(Class<?> type, Supplier<?> emptySupplier) {
|
||||||
return new ReactiveTypeDescriptor(type, emptySupplier, false, false);
|
return new ReactiveTypeDescriptor(type, false, false, emptySupplier);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -136,7 +136,7 @@ public final class ReactiveTypeDescriptor {
|
||||||
* @param type the reactive type
|
* @param type the reactive type
|
||||||
*/
|
*/
|
||||||
public static ReactiveTypeDescriptor singleRequiredValue(Class<?> type) {
|
public static ReactiveTypeDescriptor singleRequiredValue(Class<?> type) {
|
||||||
return new ReactiveTypeDescriptor(type, null, false, false);
|
return new ReactiveTypeDescriptor(type, false, false, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -145,7 +145,7 @@ public final class ReactiveTypeDescriptor {
|
||||||
* @param emptySupplier a supplier of an empty-value instance of the reactive type
|
* @param emptySupplier a supplier of an empty-value instance of the reactive type
|
||||||
*/
|
*/
|
||||||
public static ReactiveTypeDescriptor noValue(Class<?> type, Supplier<?> emptySupplier) {
|
public static ReactiveTypeDescriptor noValue(Class<?> type, Supplier<?> emptySupplier) {
|
||||||
return new ReactiveTypeDescriptor(type, emptySupplier, false, true);
|
return new ReactiveTypeDescriptor(type, false, true, emptySupplier);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ dependencies {
|
||||||
exclude group: "javax.servlet", module: "javax.servlet-api"
|
exclude group: "javax.servlet", module: "javax.servlet-api"
|
||||||
}
|
}
|
||||||
optional("org.eclipse.jetty:jetty-reactive-httpclient:1.0.3")
|
optional("org.eclipse.jetty:jetty-reactive-httpclient:1.0.3")
|
||||||
optional("com.squareup.okhttp3:okhttp:3.14.1")
|
optional("com.squareup.okhttp3:okhttp:3.14.2")
|
||||||
optional("org.apache.httpcomponents:httpclient:4.5.8") {
|
optional("org.apache.httpcomponents:httpclient:4.5.8") {
|
||||||
exclude group: "commons-logging", module: "commons-logging"
|
exclude group: "commons-logging", module: "commons-logging"
|
||||||
}
|
}
|
||||||
|
@ -75,7 +75,7 @@ dependencies {
|
||||||
testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
|
testCompile("org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}")
|
||||||
testCompile("org.eclipse.jetty:jetty-server")
|
testCompile("org.eclipse.jetty:jetty-server")
|
||||||
testCompile("org.eclipse.jetty:jetty-servlet")
|
testCompile("org.eclipse.jetty:jetty-servlet")
|
||||||
testCompile("com.squareup.okhttp3:mockwebserver:3.14.1")
|
testCompile("com.squareup.okhttp3:mockwebserver:3.14.2")
|
||||||
testCompile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
|
testCompile("org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}")
|
||||||
testCompile("org.skyscreamer:jsonassert:1.5.0")
|
testCompile("org.skyscreamer:jsonassert:1.5.0")
|
||||||
testCompile("org.xmlunit:xmlunit-matchers:2.6.2")
|
testCompile("org.xmlunit:xmlunit-matchers:2.6.2")
|
||||||
|
|
|
@ -54,12 +54,12 @@ dependencies {
|
||||||
testCompile("org.eclipse.jetty:jetty-server")
|
testCompile("org.eclipse.jetty:jetty-server")
|
||||||
testCompile("org.eclipse.jetty:jetty-servlet")
|
testCompile("org.eclipse.jetty:jetty-servlet")
|
||||||
testCompile("org.eclipse.jetty:jetty-reactive-httpclient:1.0.3")
|
testCompile("org.eclipse.jetty:jetty-reactive-httpclient:1.0.3")
|
||||||
testCompile("com.squareup.okhttp3:mockwebserver:3.14.1")
|
testCompile("com.squareup.okhttp3:mockwebserver:3.14.2")
|
||||||
testCompile("org.jetbrains.kotlin:kotlin-script-runtime:${kotlinVersion}")
|
testCompile("org.jetbrains.kotlin:kotlin-script-runtime:${kotlinVersion}")
|
||||||
testCompile(project(":spring-core-coroutines"))
|
testCompile(project(":spring-core-coroutines"))
|
||||||
testRuntime("org.jetbrains.kotlin:kotlin-script-util:${kotlinVersion}")
|
testRuntime("org.jetbrains.kotlin:kotlin-script-util:${kotlinVersion}")
|
||||||
testRuntime("org.jetbrains.kotlin:kotlin-compiler-embeddable:${kotlinVersion}")
|
testRuntime("org.jetbrains.kotlin:kotlin-compiler-embeddable:${kotlinVersion}")
|
||||||
testRuntime("org.jruby:jruby:9.2.6.0")
|
testRuntime("org.jruby:jruby:9.2.7.0")
|
||||||
testRuntime("org.python:jython-standalone:2.7.1")
|
testRuntime("org.python:jython-standalone:2.7.1")
|
||||||
testRuntime("org.synchronoss.cloud:nio-multipart-parser:1.1.0")
|
testRuntime("org.synchronoss.cloud:nio-multipart-parser:1.1.0")
|
||||||
testRuntime("org.webjars:underscorejs:1.8.3")
|
testRuntime("org.webjars:underscorejs:1.8.3")
|
||||||
|
|
|
@ -23,7 +23,7 @@ dependencies {
|
||||||
optional("javax.xml.bind:jaxb-api:2.3.1")
|
optional("javax.xml.bind:jaxb-api:2.3.1")
|
||||||
optional("org.webjars:webjars-locator-core:0.37")
|
optional("org.webjars:webjars-locator-core:0.37")
|
||||||
optional("com.rometools:rome:1.12.0")
|
optional("com.rometools:rome:1.12.0")
|
||||||
optional("com.github.librepdf:openpdf:1.2.16")
|
optional("com.github.librepdf:openpdf:1.2.17")
|
||||||
optional("org.apache.poi:poi-ooxml:4.1.0")
|
optional("org.apache.poi:poi-ooxml:4.1.0")
|
||||||
optional("org.freemarker:freemarker:${freemarkerVersion}")
|
optional("org.freemarker:freemarker:${freemarkerVersion}")
|
||||||
optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
|
optional("com.fasterxml.jackson.core:jackson-databind:${jackson2Version}")
|
||||||
|
@ -55,7 +55,7 @@ dependencies {
|
||||||
}
|
}
|
||||||
testCompile("commons-fileupload:commons-fileupload:1.4")
|
testCompile("commons-fileupload:commons-fileupload:1.4")
|
||||||
testCompile("commons-io:commons-io:2.5")
|
testCompile("commons-io:commons-io:2.5")
|
||||||
testCompile("joda-time:joda-time:2.10.1")
|
testCompile("joda-time:joda-time:2.10.2")
|
||||||
testCompile("org.mozilla:rhino:1.7.10")
|
testCompile("org.mozilla:rhino:1.7.10")
|
||||||
testCompile("dom4j:dom4j:1.6.1") {
|
testCompile("dom4j:dom4j:1.6.1") {
|
||||||
exclude group: "xml-apis", module: "xml-apis"
|
exclude group: "xml-apis", module: "xml-apis"
|
||||||
|
@ -74,7 +74,7 @@ dependencies {
|
||||||
testCompile("org.jetbrains.kotlin:kotlin-script-runtime:${kotlinVersion}")
|
testCompile("org.jetbrains.kotlin:kotlin-script-runtime:${kotlinVersion}")
|
||||||
testRuntime("org.jetbrains.kotlin:kotlin-script-util:${kotlinVersion}")
|
testRuntime("org.jetbrains.kotlin:kotlin-script-util:${kotlinVersion}")
|
||||||
testRuntime("org.jetbrains.kotlin:kotlin-compiler-embeddable:${kotlinVersion}")
|
testRuntime("org.jetbrains.kotlin:kotlin-compiler-embeddable:${kotlinVersion}")
|
||||||
testRuntime("org.jruby:jruby:9.2.6.0")
|
testRuntime("org.jruby:jruby:9.2.7.0")
|
||||||
testRuntime("org.python:jython-standalone:2.7.1")
|
testRuntime("org.python:jython-standalone:2.7.1")
|
||||||
testRuntime("org.webjars:underscorejs:1.8.3")
|
testRuntime("org.webjars:underscorejs:1.8.3")
|
||||||
testRuntime("org.glassfish:javax.el:3.0.1-b08")
|
testRuntime("org.glassfish:javax.el:3.0.1-b08")
|
||||||
|
|
Loading…
Reference in New Issue