Skip to content

Commit

Permalink
Add missing maybe null.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Oct 10, 2022
1 parent 34110f8 commit 4e3f710
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions byte-buddy-dep/src/main/java/net/bytebuddy/asm/Advice.java
Original file line number Diff line number Diff line change
Expand Up @@ -3872,11 +3872,11 @@ public Factory(Class<T> annotationType, StackManipulation stackManipulation, Typ
* Creates a binding for a fixed {@link String}, a primitive value or a method handle or type.
*
* @param annotationType The annotation type.
* @param value The primitive (wrapper) value, {@link String} value, method handle or type to bind.
* @param value The constant value to bind or {@code null} to bind the parameter type's default value.
* @param <S> The annotation type.
* @return A factory for creating an offset mapping that binds the supplied value.
*/
public static <S extends Annotation> OffsetMapping.Factory<S> of(Class<S> annotationType, Object value) {
public static <S extends Annotation> OffsetMapping.Factory<S> of(Class<S> annotationType, @MaybeNull Object value) {
StackManipulation stackManipulation;
TypeDescription typeDescription;
if (value == null) {
Expand Down Expand Up @@ -13732,11 +13732,11 @@ protected WithCustomMapping(PostProcessor.Factory postProcessorFactory,
* and any primitive or the value {@code null}.
*
* @param type The type of the annotation being bound.
* @param value The value to bind to the annotation.
* @param value The value to bind to the annotation or {@code null} to bind the parameter type's default value.
* @param <T> The annotation type.
* @return A new builder for an advice that considers the supplied annotation type during binding.
*/
public <T extends Annotation> WithCustomMapping bind(Class<T> type, Object value) {
public <T extends Annotation> WithCustomMapping bind(Class<T> type, @MaybeNull Object value) {
return bind(OffsetMapping.ForStackManipulation.Factory.of(type, value));
}

Expand Down

0 comments on commit 4e3f710

Please sign in to comment.