File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
src/main/java/difflib/algorithm/jgit Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 21
21
import difflib .patch .DeltaType ;
22
22
import java .util .ArrayList ;
23
23
import java .util .List ;
24
+ import java .util .Objects ;
24
25
import org .eclipse .jgit .diff .Edit ;
25
26
import org .eclipse .jgit .diff .EditList ;
26
27
import org .eclipse .jgit .diff .HistogramDiff ;
@@ -37,6 +38,8 @@ public class JGitDiff<T> implements DiffAlgorithm<T> {
37
38
38
39
@ Override
39
40
public List <Change > diff (List <T > original , List <T > revised ) throws DiffException {
41
+ Objects .requireNonNull (original , "original list must not be null" );
42
+ Objects .requireNonNull (revised , "revised list must not be null" );
40
43
EditList diffList = new EditList ();
41
44
diffList .addAll (new HistogramDiff ().diff (new DataListComparator <>(), new DataList <>(original ), new DataList <>(revised )));
42
45
List <Change > patch = new ArrayList <>();
You can’t perform that action at this time.
0 commit comments