Community
Participate
Working Groups
A user of our RCP app reported the following exception with no steps to reproduce. It seems that ApplyPatchOperation created a FileDiff containing a null newPath, and that calculateFuzz was unable to deal with this situation. I'm not sure how to construct a patch that results in a null path, but I suspect a compare bug since the object was constructed by Eclipse compare code and that's where the exception was thrown. java.lang.NullPointerException at org.eclipse.compare.internal.patch.FileDiffResult.calculateFuzz(FileDiffResult.java:220) at org.eclipse.compare.internal.patch.FileDiffResult.patch(FileDiffResult.java:148) at org.eclipse.compare.internal.patch.FileDiffResult.refresh(FileDiffResult.java:101) at org.eclipse.compare.internal.patch.FileDiff.apply(FileDiff.java:178) at com.ibm.team.filesystem.ui.views.ApplyPatchUtil.applyFilePatch(ApplyPatchUtil.java:889) at com.ibm.team.filesystem.ui.views.ApplyPatchUtil.access$0(ApplyPatchUtil.java:883) at com.ibm.team.filesystem.ui.views.ApplyPatchUtil$4.run(ApplyPatchUtil.java:767) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1797) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1779) at com.ibm.team.filesystem.ui.views.ApplyPatchUtil.doApplyPatch(ApplyPatchUtil.java:750) at com.ibm.team.filesystem.ui.views.ApplyPatchUtil$3$1$1.repositoryRun(ApplyPatchUtil.java:394) at com.ibm.team.repository.rcp.ui.operations.RepositoryOperation.run(RepositoryOperation.java:20) at com.ibm.team.repository.rcp.ui.operations.JobRunner.run(JobRunner.java:107) at com.ibm.team.repository.rcp.ui.operations.JobRunner.access$0(JobRunner.java:80) at com.ibm.team.repository.rcp.ui.operations.JobRunner$1.run(JobRunner.java:40) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)
Fix is trivial so we will consider for RC1.
Created attachment 66251 [details] Patch Hope this will prevent from throwing NPE in that line.
Patch reviewed and released to HEAD
Created attachment 67800 [details] Test case
Verified in I20070517-0010 with the provided test case. Michael, please release the test case too.
Test case released to HEAD