Merge branch '6.1.x'

This commit is contained in:
Sébastien Deleuze
2024-03-26 15:41:46 +01:00
88 changed files with 172 additions and 72 deletions

View File

@@ -63,7 +63,7 @@ public class BindingReflectionHintsRegistrar {
* @param hints the hints instance to use
* @param types the types to register
*/
public void registerReflectionHints(ReflectionHints hints, Type... types) {
public void registerReflectionHints(ReflectionHints hints, @Nullable Type... types) {
Set<Type> seen = new HashSet<>();
for (Type type : types) {
registerReflectionHints(hints, seen, type);

View File

@@ -92,7 +92,7 @@ public abstract class CoroutinesUtils {
* @return the method invocation result as reactive stream
* @throws IllegalArgumentException if {@code method} is not a suspending function
*/
public static Publisher<?> invokeSuspendingFunction(Method method, Object target, Object... args) {
public static Publisher<?> invokeSuspendingFunction(Method method, Object target, @Nullable Object... args) {
return invokeSuspendingFunction(Dispatchers.getUnconfined(), method, target, args);
}
@@ -110,7 +110,7 @@ public abstract class CoroutinesUtils {
*/
@SuppressWarnings({"deprecation", "DataFlowIssue"})
public static Publisher<?> invokeSuspendingFunction(
CoroutineContext context, Method method, @Nullable Object target, Object... args) {
CoroutineContext context, Method method, @Nullable Object target, @Nullable Object... args) {
Assert.isTrue(KotlinDetector.isSuspendingFunction(method), "Method must be a suspending function");
KFunction<?> function = ReflectJvmMapping.getKotlinFunction(method);

View File

@@ -41,7 +41,7 @@ public abstract class NestedRuntimeException extends RuntimeException {
* Construct a {@code NestedRuntimeException} with the specified detail message.
* @param msg the detail message
*/
public NestedRuntimeException(String msg) {
public NestedRuntimeException(@Nullable String msg) {
super(msg);
}

View File

@@ -34,7 +34,7 @@ public class CodecException extends NestedRuntimeException {
* Create a new CodecException.
* @param msg the detail message
*/
public CodecException(String msg) {
public CodecException(@Nullable String msg) {
super(msg);
}
@@ -43,7 +43,7 @@ public class CodecException extends NestedRuntimeException {
* @param msg the detail message
* @param cause root cause for the exception, if any
*/
public CodecException(String msg, @Nullable Throwable cause) {
public CodecException(@Nullable String msg, @Nullable Throwable cause) {
super(msg, cause);
}

View File

@@ -39,7 +39,7 @@ public class DecodingException extends CodecException {
* Create a new DecodingException.
* @param msg the detail message
*/
public DecodingException(String msg) {
public DecodingException(@Nullable String msg) {
super(msg);
}
@@ -48,7 +48,7 @@ public class DecodingException extends CodecException {
* @param msg the detail message
* @param cause root cause for the exception, if any
*/
public DecodingException(String msg, @Nullable Throwable cause) {
public DecodingException(@Nullable String msg, @Nullable Throwable cause) {
super(msg, cause);
}

View File

@@ -201,7 +201,7 @@ public abstract class StreamUtils {
* @throws IOException in case of I/O errors
* @since 4.3
*/
public static int drain(InputStream in) throws IOException {
public static int drain(@Nullable InputStream in) throws IOException {
Assert.notNull(in, "No InputStream specified");
return (int) in.transferTo(OutputStream.nullOutputStream());
}