4040 */
4141class InstrumentedMethodTests {
4242
43- private RuntimeHints hints = new RuntimeHints ();
43+ private final RuntimeHints hints = new RuntimeHints ();
4444
4545
4646 @ Nested
4747 class ClassReflectionInstrumentationTests {
4848
49- RecordedInvocation stringGetClasses = RecordedInvocation .of (InstrumentedMethod .CLASS_GETCLASSES )
49+ final RecordedInvocation stringGetClasses = RecordedInvocation .of (InstrumentedMethod .CLASS_GETCLASSES )
5050 .onInstance (String .class ).returnValue (String .class .getClasses ()).build ();
5151
52- RecordedInvocation stringGetDeclaredClasses = RecordedInvocation .of (InstrumentedMethod .CLASS_GETDECLAREDCLASSES )
52+ final RecordedInvocation stringGetDeclaredClasses = RecordedInvocation .of (InstrumentedMethod .CLASS_GETDECLAREDCLASSES )
5353 .onInstance (String .class ).returnValue (String .class .getDeclaredClasses ()).build ();
5454
5555 @ Test
@@ -106,12 +106,12 @@ class ConstructorReflectionInstrumentationTests {
106106
107107 RecordedInvocation stringGetConstructor ;
108108
109- RecordedInvocation stringGetConstructors = RecordedInvocation .of (InstrumentedMethod .CLASS_GETCONSTRUCTORS )
109+ final RecordedInvocation stringGetConstructors = RecordedInvocation .of (InstrumentedMethod .CLASS_GETCONSTRUCTORS )
110110 .onInstance (String .class ).returnValue (String .class .getConstructors ()).build ();
111111
112112 RecordedInvocation stringGetDeclaredConstructor ;
113113
114- RecordedInvocation stringGetDeclaredConstructors = RecordedInvocation .of (InstrumentedMethod .CLASS_GETDECLAREDCONSTRUCTORS )
114+ final RecordedInvocation stringGetDeclaredConstructors = RecordedInvocation .of (InstrumentedMethod .CLASS_GETDECLAREDCONSTRUCTORS )
115115 .onInstance (String .class ).returnValue (String .class .getDeclaredConstructors ()).build ();
116116
117117 @ BeforeEach
@@ -434,7 +434,7 @@ void classGetMethodShouldMatchInvokeMethodHint() {
434434 }
435435
436436 @ Test
437- void classGetMethodShouldNotMatchInstrospectPublicMethodsHintWhenPrivate () throws Exception {
437+ void classGetMethodShouldNotMatchInstrospectPublicMethodsHintWhenPrivate () {
438438 hints .reflection ().registerType (String .class , MemberCategory .INTROSPECT_PUBLIC_METHODS );
439439 assertThatInvocationDoesNotMatch (InstrumentedMethod .CLASS_GETMETHOD , this .stringGetScaleMethod );
440440 }
@@ -556,7 +556,7 @@ void classGetFieldShouldMatchFieldHint() {
556556 }
557557
558558 @ Test
559- void classGetFieldShouldNotMatchPublicFieldsHintWhenPrivate () throws NoSuchFieldException {
559+ void classGetFieldShouldNotMatchPublicFieldsHintWhenPrivate () {
560560 RecordedInvocation invocation = RecordedInvocation .of (InstrumentedMethod .CLASS_GETFIELD )
561561 .onInstance (String .class ).withArgument ("value" ).returnValue (null ).build ();
562562 hints .reflection ().registerType (String .class , MemberCategory .PUBLIC_FIELDS );
@@ -572,7 +572,7 @@ void classGetFieldShouldMatchDeclaredFieldsHintWhenPrivate() throws NoSuchFieldE
572572 }
573573
574574 @ Test
575- void classGetFieldShouldNotMatchForWrongType () throws Exception {
575+ void classGetFieldShouldNotMatchForWrongType () {
576576 RecordedInvocation invocation = RecordedInvocation .of (InstrumentedMethod .CLASS_GETFIELD )
577577 .onInstance (String .class ).withArgument ("value" ).returnValue (null ).build ();
578578 hints .reflection ().registerType (Integer .class , MemberCategory .DECLARED_FIELDS );
0 commit comments