Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid unhandled NPEs in FoldingReconcilerStrategy
The exception below is printed to standard error every time a generic editor diff contribution is used in compare editor for target files. I assume it never worked as designed with TargetPlatformFoldingReconciler, so just add a NPE guard to prevent unhandled exceptions / printouts. ``` Exception in thread "org.eclipse.pde.internal.genericeditor.target.extension.reconciler.folding.TargetPlatformFoldingReconciler" java.lang.NullPointerException: Cannot invoke "org.eclipse.jface.text.source.projection.ProjectionViewer.getProjectionAnnotationModel()" because "this.projectionViewer" is null at org.eclipse.pde.internal.genericeditor.target.extension.reconciler.folding.FoldingReconcilerStrategy.initialReconcile(FoldingReconcilerStrategy.java:63) at org.eclipse.jface.text.reconciler.Reconciler.initialProcess(Reconciler.java:223) at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:177) ``` See eclipse-platform/eclipse.platform.ui#1798
- Loading branch information