Preserve javax nullability annotations for AOP Alliance fork

See gh-28410
This commit is contained in:
Juergen Hoeller 2022-05-05 17:26:17 +02:00
parent 0f6d459de7
commit 17c778e3a0
8 changed files with 184 additions and 181 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2016 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.
@ -16,7 +16,7 @@
package org.aopalliance.intercept;
import org.springframework.lang.NonNull;
import javax.annotation.Nonnull;
/**
* Intercepts the construction of a new object.
@ -56,7 +56,7 @@ public interface ConstructorInterceptor extends Interceptor {
* @throws Throwable if the interceptors or the target object
* throws an exception
*/
@NonNull
@Nonnull
Object construct(ConstructorInvocation invocation) throws Throwable;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2018 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.
@ -18,7 +18,7 @@ package org.aopalliance.intercept;
import java.lang.reflect.Constructor;
import org.springframework.lang.NonNull;
import javax.annotation.Nonnull;
/**
* Description of an invocation to a constructor, given to an
@ -38,7 +38,7 @@ public interface ConstructorInvocation extends Invocation {
* {@link Joinpoint#getStaticPart()} method (same result).
* @return the constructor being called
*/
@NonNull
@Nonnull
Constructor<?> getConstructor();
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2016 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.
@ -16,7 +16,7 @@
package org.aopalliance.intercept;
import org.springframework.lang.NonNull;
import javax.annotation.Nonnull;
/**
* This interface represents an invocation in the program.
@ -34,7 +34,7 @@ public interface Invocation extends Joinpoint {
* array to change the arguments.
* @return the argument of the invocation
*/
@NonNull
@Nonnull
Object[] getArguments();
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2021 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.
@ -18,8 +18,8 @@ package org.aopalliance.intercept;
import java.lang.reflect.AccessibleObject;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
/**
* This interface represents a generic runtime joinpoint (in the AOP
@ -65,7 +65,7 @@ public interface Joinpoint {
* <p>The static part is an accessible object on which a chain of
* interceptors are installed.
*/
@NonNull
@Nonnull
AccessibleObject getStaticPart();
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2018 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.
@ -16,8 +16,8 @@
package org.aopalliance.intercept;
import org.springframework.lang.NonNull;
import org.springframework.lang.Nullable;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
/**
* Intercepts calls on an interface on its way to the target. These
@ -56,6 +56,6 @@ public interface MethodInterceptor extends Interceptor {
* throws an exception
*/
@Nullable
Object invoke(@NonNull MethodInvocation invocation) throws Throwable;
Object invoke(@Nonnull MethodInvocation invocation) throws Throwable;
}

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2016 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.
@ -18,7 +18,7 @@ package org.aopalliance.intercept;
import java.lang.reflect.Method;
import org.springframework.lang.NonNull;
import javax.annotation.Nonnull;
/**
* Description of an invocation to a method, given to an interceptor
@ -38,7 +38,7 @@ public interface MethodInvocation extends Invocation {
* {@link Joinpoint#getStaticPart()} method (same result).
* @return the method being called
*/
@NonNull
@Nonnull
Method getMethod();
}

View File

@ -12,6 +12,9 @@
<!-- JMH benchmarks -->
<suppress files="[\\/]src[\\/]jmh[\\/]java[\\/]org[\\/]springframework[\\/]" checks="JavadocVariable|JavadocStyle|InnerTypeLast"/>
<!-- spring-aop -->
<suppress files="[\\/]src[\\/]main[\\/]java[\\/]org[\\/]aopalliance[\\/]" checks="IllegalImport" id="bannedImports" message="javax"/>
<!-- spring-beans -->
<suppress files="TypeMismatchException" checks="MutableException"/>
<suppress files="BeanCreationException" checks="MutableException"/>