File tree 1 file changed +4
-5
lines changed
junit-jupiter-params/src/main/java/org/junit/jupiter/params 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -86,11 +86,11 @@ public void afterTestExecution(ExtensionContext context) {
86
86
Store store = context .getStore (NAMESPACE );
87
87
AtomicInteger argumentIndex = new AtomicInteger ();
88
88
89
- Arrays .stream (arguments ) //
89
+ Arrays .stream (this . arguments ) //
90
90
.filter (AutoCloseable .class ::isInstance ) //
91
91
.map (AutoCloseable .class ::cast ) //
92
92
.map (CloseableArgument ::new ) //
93
- .forEach (closeable -> store .put ("closeableArgument" + argumentIndex .getAndIncrement (), closeable ));
93
+ .forEach (closeable -> store .put ("closeableArgument# " + argumentIndex .incrementAndGet (), closeable ));
94
94
}
95
95
96
96
private static class CloseableArgument implements Store .CloseableResource {
@@ -103,17 +103,16 @@ private static class CloseableArgument implements Store.CloseableResource {
103
103
104
104
@ Override
105
105
public void close () throws Throwable {
106
- autoCloseable .close ();
106
+ this . autoCloseable .close ();
107
107
}
108
108
109
109
}
110
110
111
- @ SuppressWarnings ("unchecked" )
112
111
private Object [] extractPayloads (Object [] arguments ) {
113
112
return Arrays .stream (arguments ) //
114
113
.map (argument -> {
115
114
if (argument instanceof Named ) {
116
- return ((Named <Object >) argument ).getPayload ();
115
+ return ((Named <? >) argument ).getPayload ();
117
116
}
118
117
return argument ;
119
118
}) //
You can’t perform that action at this time.
0 commit comments