@@ -278,7 +278,7 @@ private static List<Action> getActionsWhichUsesFunctionDefinition(
278
278
List <Action > onEventActions = onEvent .getActions ();
279
279
if (onEventActions != null ) {
280
280
for (Action onEventAction : onEventActions ) {
281
- if (doesActionUsesFuntionDefinition (functionDefinitionName , onEventAction ))
281
+ if (checkIfActionUsesFunctionDefinition (functionDefinitionName , onEventAction ))
282
282
actions .add (onEventAction );
283
283
}
284
284
}
@@ -288,7 +288,7 @@ private static List<Action> getActionsWhichUsesFunctionDefinition(
288
288
} else if (state instanceof CallbackState ) {
289
289
CallbackState callbackState = (CallbackState ) state ;
290
290
final Action callbackStateAction = callbackState .getAction ();
291
- if (doesActionUsesFuntionDefinition (functionDefinitionName , callbackStateAction )) {
291
+ if (checkIfActionUsesFunctionDefinition (functionDefinitionName , callbackStateAction )) {
292
292
actions .add (callbackStateAction );
293
293
}
294
294
@@ -297,7 +297,7 @@ private static List<Action> getActionsWhichUsesFunctionDefinition(
297
297
final List <Action > operationStateActions = operationState .getActions ();
298
298
if (operationStateActions != null ) {
299
299
for (Action operationStateAction : operationStateActions ) {
300
- if (doesActionUsesFuntionDefinition (functionDefinitionName , operationStateAction )) {
300
+ if (checkIfActionUsesFunctionDefinition (functionDefinitionName , operationStateAction )) {
301
301
actions .add (operationStateAction );
302
302
}
303
303
}
@@ -310,7 +310,7 @@ private static List<Action> getActionsWhichUsesFunctionDefinition(
310
310
List <Action > branchActions = branch .getActions ();
311
311
if (branchActions != null ) {
312
312
for (Action branchAction : branchActions ) {
313
- if (doesActionUsesFuntionDefinition (functionDefinitionName , branchAction )) {
313
+ if (checkIfActionUsesFunctionDefinition (functionDefinitionName , branchAction )) {
314
314
actions .add (branchAction );
315
315
}
316
316
}
@@ -322,7 +322,7 @@ private static List<Action> getActionsWhichUsesFunctionDefinition(
322
322
List <Action > forEachStateActions = forEachState .getActions ();
323
323
if (forEachStateActions != null ) {
324
324
for (Action forEachStateAction : forEachStateActions ) {
325
- if (doesActionUsesFuntionDefinition (functionDefinitionName , forEachStateAction )) {
325
+ if (checkIfActionUsesFunctionDefinition (functionDefinitionName , forEachStateAction )) {
326
326
actions .add (forEachStateAction );
327
327
}
328
328
}
@@ -333,12 +333,12 @@ private static List<Action> getActionsWhichUsesFunctionDefinition(
333
333
return actions ;
334
334
}
335
335
336
- private static boolean doesActionUsesFuntionDefinition (
337
- String functionDefinitionName , Action forEachStateAction ) {
338
- return forEachStateAction != null
339
- && forEachStateAction .getFunctionRef () != null
340
- && forEachStateAction .getFunctionRef ().getRefName () != null
341
- && forEachStateAction .getFunctionRef ().getRefName ().equals (functionDefinitionName );
336
+ private static boolean checkIfActionUsesFunctionDefinition (
337
+ String functionDefinitionName , Action action ) {
338
+ return action != null
339
+ && action .getFunctionRef () != null
340
+ && action .getFunctionRef ().getRefName () != null
341
+ && action .getFunctionRef ().getRefName ().equals (functionDefinitionName );
342
342
}
343
343
344
344
private static boolean hasFunctionDefs (Workflow workflow , String functionDefinitionName ) {
0 commit comments