I would like to ask regarding the below code lines why i get null pointer Exception. Is this something Git related which i don't understand ?
refsideMerge=existingRepo.exactRef("refs/heads/sideMerge");
tmpMerge = git.merge();
tmpMerge.include(refsideMerge);
tmpMerge.setCommit(false);//dry run to get conflicting files
tmpMergeRes = tmpMerge.call();
Map allConflicts = tmpMergeRes.getConflicts();
for (Map.Entry<String,int[][]> entry : tmpMergeRes.getConflicts().entrySet()) {
System.out.println("Key: " + entry.getKey());
for(int[] arr : entry.getValue()) {
System.out.println("value: " + Arrays.toString(arr));
}
}
Description:
After Repeatedly running this code snippet i bump into Nullpointer exception. I want to test my xml Parsing for Merge Conflicts that's why i need repeated Merge Conflicts to handle. Currently only the Merge part is used to generate conflicts.
As far as i realized it stops at the below line
Map allConflicts = tmpMergeRes.getConflicts();