Nullability refinements and related polishing

See gh-32475
This commit is contained in:
Juergen Hoeller
2024-03-19 09:58:44 +01:00
parent cd7ba1835c
commit c531a8a705
58 changed files with 327 additions and 257 deletions

View File

@@ -364,18 +364,18 @@ public abstract class AopUtils {
}
}
/**
* Inner class to avoid a hard dependency on Kotlin at runtime.
*/
private static class KotlinDelegate {
public static Publisher<?> invokeSuspendingFunction(Method method, Object target, Object... args) {
public static Publisher<?> invokeSuspendingFunction(Method method, @Nullable Object target, Object... args) {
Continuation<?> continuation = (Continuation<?>) args[args.length -1];
Assert.state(continuation != null, "No Continuation available");
CoroutineContext context = continuation.getContext().minusKey(Job.Key);
return CoroutinesUtils.invokeSuspendingFunction(context, method, target, args);
}
}
}