Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public GenericDiffReporter(String diffProgram, String argumentsFormat, String di
this.diffProgram = diffProgram;
this.arguments = argumentsFormat;
this.diffProgramNotFoundMessage = diffProgramNotFoundMessage;
validExtensions = validFileExtensions;
this.validExtensions = validFileExtensions;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (bug_risk): The change is behaviorally identical to the removed assignment and does not prevent validExtensions from remaining null. When validFileExtensions is null—as permitted by the four-argument constructor and used by existing tests—isFileExtensionHandled passes null to isFileExtensionValid, whose contains call raises the reported NullPointerException.

Triggers: When a reporter is constructed with a null extension list.

Suggested fix: Default null extension lists to an empty list or handle null in isFileExtensionHandled/isFileExtensionValid.

Suggested change
this.validExtensions = validFileExtensions;
this.validExtensions = validFileExtensions == null ? new ArrayList<String>() : validFileExtensions;

}

public GenericDiffReporter(DiffInfo info)
Expand Down