88 * https://www.eclipse.org/legal/epl-v20.html
99 */
1010
11+ import java .util .Objects ;
1112package org .junit .jupiter .engine .descriptor ;
1213
1314import static org .junit .platform .commons .util .CollectionUtils .forEachInReverseOrder ;
@@ -25,6 +26,10 @@ class CallbackSupport {
2526
2627 static <T extends Extension > void invokeBeforeCallbacks (Class <T > type , JupiterEngineExecutionContext context ,
2728 CallbackInvoker <T > callbackInvoker ) {
29+
30+ Objects .requireNonNull (type , "type must not be null" );
31+ Objects .requireNonNull (context , "context must not be null" );
32+ Objects .requireNonNull (callbackInvoker , "callbackInvoker must not be null" );
2833
2934 ExtensionRegistry registry = context .getExtensionRegistry ();
3035 ExtensionContext extensionContext = context .getExtensionContext ();
@@ -40,7 +45,11 @@ static <T extends Extension> void invokeBeforeCallbacks(Class<T> type, JupiterEn
4045
4146 static <T extends Extension > void invokeAfterCallbacks (Class <T > type , JupiterEngineExecutionContext context ,
4247 CallbackInvoker <T > callbackInvoker ) {
43-
48+
49+ Objects .requireNonNull (type , "type must not be null" );
50+ Objects .requireNonNull (context , "context must not be null" );
51+ Objects .requireNonNull (callbackInvoker , "callbackInvoker must not be null" );
52+
4453 ExtensionRegistry registry = context .getExtensionRegistry ();
4554 ExtensionContext extensionContext = context .getExtensionContext ();
4655 ThrowableCollector throwableCollector = context .getThrowableCollector ();
0 commit comments