Explicit nullability declarations for all AOP Alliance methods
Includes consistent declarations in AOP Alliance related Spring AOP code. Closes gh-24117
This commit is contained in:
@@ -134,6 +134,7 @@ public class PersistenceExceptionTranslationInterceptor
|
||||
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Object invoke(MethodInvocation mi) throws Throwable {
|
||||
try {
|
||||
return mi.proceed();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -107,6 +107,7 @@ public class GenericMessageEndpointFactory extends AbstractMessageEndpointFactor
|
||||
private class GenericMessageEndpoint extends AbstractMessageEndpoint implements MethodInterceptor {
|
||||
|
||||
@Override
|
||||
@Nullable
|
||||
public Object invoke(MethodInvocation methodInvocation) throws Throwable {
|
||||
Throwable endpointEx = null;
|
||||
boolean applyDeliveryCalls = !hasBeforeDeliveryBeenCalled();
|
||||
|
||||
@@ -375,7 +375,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
|
||||
cleanupTransactionInfo(txInfo);
|
||||
}
|
||||
|
||||
if (vavrPresent && VavrDelegate.isVavrTry(retVal)) {
|
||||
if (retVal != null && vavrPresent && VavrDelegate.isVavrTry(retVal)) {
|
||||
// Set rollback-only in case of Vavr failure matching our rollback rules...
|
||||
TransactionStatus status = txInfo.getTransactionStatus();
|
||||
if (status != null && txAttr != null) {
|
||||
@@ -396,7 +396,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
|
||||
TransactionInfo txInfo = prepareTransactionInfo(ptm, txAttr, joinpointIdentification, status);
|
||||
try {
|
||||
Object retVal = invocation.proceedWithInvocation();
|
||||
if (vavrPresent && VavrDelegate.isVavrTry(retVal)) {
|
||||
if (retVal != null && vavrPresent && VavrDelegate.isVavrTry(retVal)) {
|
||||
// Set rollback-only in case of Vavr failure matching our rollback rules...
|
||||
retVal = VavrDelegate.evaluateTryFailure(retVal, txAttr, status);
|
||||
}
|
||||
@@ -780,6 +780,7 @@ public abstract class TransactionAspectSupport implements BeanFactoryAware, Init
|
||||
@FunctionalInterface
|
||||
protected interface InvocationCallback {
|
||||
|
||||
@Nullable
|
||||
Object proceedWithInvocation() throws Throwable;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user