-
-
Notifications
You must be signed in to change notification settings - Fork 205
Closed
Description
I was testing the tool and I picked a random commit from this repo to do so. Let's take 5338313. I accessed the diff
of it by adding a .diff
at the end of the URL and saved it into diff.txt
file. I then used the tool to parse it in the following way:
public static void main(String[] args) throws IOException {
var stream = new FileInputStream(new File("/path/to/diff.txt"));
var patch = UnifiedDiffReader.parseUnifiedDiff(stream);
patch.getFiles().forEach(f -> {
System.out.println("File: " + f.getFromFile());
f.getPatch().getDeltas().forEach(delta -> {
System.out.println("Source: ");
System.out.println(delta.getSource().getPosition());
delta.getSource().getChangePosition().forEach(System.out::print);
System.out.println("Target: ");
System.out.println(delta.getTarget().getPosition());
delta.getTarget().getChangePosition().forEach(System.out::print);
});
});
}
The delta getChangePosition
is just null
. Am I doing something wrong?
Metadata
Metadata
Assignees
Labels
No labels