Skip to content

Commit

Permalink
Fix issue when TemplateFuzzer was runing when not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
en-milie committed Apr 1, 2022
1 parent 2898703 commit 6d3f387
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;

Expand All @@ -51,7 +52,7 @@ public TemplateFuzzer(ServiceCaller sc, TestCaseListener lr, CatsUtil cu, UserAr

@Override
public void fuzz(FuzzingData data) {
for (String targetField : data.getTargetFields()) {
for (String targetField : Optional.ofNullable(data.getTargetFields()).orElse(Collections.emptySet())) {
int payloadSize = this.getPayloadSize(data, targetField);

if (payloadSize == 0) {
Expand Down

0 comments on commit 6d3f387

Please sign in to comment.