5
5
import net .bytebuddy .description .modifier .TypeManifestation ;
6
6
import net .bytebuddy .description .modifier .Visibility ;
7
7
import net .bytebuddy .dynamic .scaffold .subclass .ConstructorStrategy ;
8
+ import net .bytebuddy .implementation .StubMethod ;
8
9
import net .bytebuddy .implementation .SuperMethodCall ;
9
10
import net .bytebuddy .test .utility .JavaVersionRule ;
10
11
import net .bytebuddy .test .utility .ObjectPropertyAssertion ;
@@ -128,12 +129,12 @@ public void testStaticMethodOnInterfaceAssertion() throws Exception {
128
129
}
129
130
130
131
@ Test
131
- @ JavaVersionRule .Enforce (value = 8 )
132
+ @ JavaVersionRule .Enforce (8 )
132
133
public void testStaticMethodOnAnnotationAssertionJava8 () throws Exception {
133
134
new ByteBuddy ()
134
135
.makeInterface ()
135
136
.defineMethod (FOO , String .class , Collections .<Class <?>>emptyList (), Visibility .PUBLIC , Ownership .STATIC )
136
- .withoutCode ( )
137
+ .intercept ( StubMethod . INSTANCE )
137
138
.make ();
138
139
}
139
140
@@ -143,16 +144,17 @@ public void testStaticMethodOnAnnotationAssertion() throws Exception {
143
144
new ByteBuddy ()
144
145
.makeAnnotation ()
145
146
.defineMethod (FOO , String .class , Collections .<Class <?>>emptyList (), Visibility .PUBLIC , Ownership .STATIC )
146
- .withoutCode ( )
147
+ .intercept ( StubMethod . INSTANCE )
147
148
.make ();
148
149
}
149
150
150
151
@ Test
151
- @ JavaVersionRule .Enforce (value = 8 )
152
+ @ JavaVersionRule .Enforce (8 )
152
153
public void testStaticMethodOnInterfaceAssertionJava8 () throws Exception {
153
154
new ByteBuddy ()
154
155
.makeAnnotation ()
155
- .defineField (FOO , String .class , Visibility .PUBLIC , Ownership .STATIC )
156
+ .defineMethod (FOO , String .class , Collections .<Class <?>>emptyList (), Visibility .PUBLIC , Ownership .STATIC )
157
+ .intercept (StubMethod .INSTANCE )
156
158
.make ();
157
159
}
158
160
0 commit comments