Skip to content

Commit

Permalink
Do not require serializability as method handles can be stored in a c…
Browse files Browse the repository at this point in the history
…onstant pool without being serializable.
  • Loading branch information
raphw committed Apr 10, 2016
1 parent bc67cec commit 7dac0df
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
Expand Up @@ -4921,21 +4921,21 @@ public String toString() {
@SuppressWarnings("unused") @SuppressWarnings("unused")
public interface DynamicValue<T extends Annotation> { public interface DynamicValue<T extends Annotation> {


Serializable resolve(MethodDescription.InDefinedShape instrumentedMethod, Object resolve(MethodDescription.InDefinedShape instrumentedMethod,
ParameterDescription.InDefinedShape target, ParameterDescription.InDefinedShape target,
AnnotationDescription.Loadable<T> annotation, AnnotationDescription.Loadable<T> annotation,
boolean initialized); boolean initialized);


class ForFixedValue<S extends Annotation> implements DynamicValue<S> { class ForFixedValue<S extends Annotation> implements DynamicValue<S> {


private final Serializable value; private final Object value;


public ForFixedValue(Serializable value) { public ForFixedValue(Object value) {
this.value = value; this.value = value;
} }


@Override @Override
public Serializable resolve(MethodDescription.InDefinedShape instrumentedMethod, public Object resolve(MethodDescription.InDefinedShape instrumentedMethod,
ParameterDescription.InDefinedShape target, ParameterDescription.InDefinedShape target,
AnnotationDescription.Loadable<S> annotation, AnnotationDescription.Loadable<S> annotation,
boolean initialized) { boolean initialized) {
Expand Down

0 comments on commit 7dac0df

Please sign in to comment.