Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Johnston2018-08-17 18:17:59 -0400
committerJeff Johnston2018-08-18 00:26:05 -0400
commitdb181a7a294d9904f36178f513fc151185fafde6 (patch)
tree349cd178768d6afeb139818c66c7e34e8d484e9d
parent373d520d5f1892184be28771f770e1a1f6e94e46 (diff)
downloadorg.eclipse.linuxtools-db181a7a294d9904f36178f513fc151185fafde6.tar.gz
org.eclipse.linuxtools-db181a7a294d9904f36178f513fc151185fafde6.tar.xz
org.eclipse.linuxtools-db181a7a294d9904f36178f513fc151185fafde6.zip
Bug 538050 - NullPointerException in SpecfileParser.parse
- add null check in SpecfileReconcilingStrategy.updateEditor() Change-Id: I2593db659b8970560718a32ca96aa3aba8cd7870 Reviewed-on: https://git.eclipse.org/r/127624 Tested-by: CI Bot Reviewed-by: Jeff Johnston <jjohnstn@redhat.com>
-rw-r--r--rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileReconcilingStrategy.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileReconcilingStrategy.java b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileReconcilingStrategy.java
index f438f850fb..7069177447 100644
--- a/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileReconcilingStrategy.java
+++ b/rpm/org.eclipse.linuxtools.rpm.ui.editor/src/org/eclipse/linuxtools/internal/rpm/ui/editor/SpecfileReconcilingStrategy.java
@@ -79,8 +79,11 @@ public class SpecfileReconcilingStrategy implements IReconcilingStrategy, IRecon
private void updateEditor() {
Shell shell = editor.getSite().getShell();
if (!(shell == null || shell.isDisposed())) {
- shell.getDisplay().asyncExec(() -> editor
- .setSpecfile(editor.getParser().parse(documentProvider.getDocument(editor.getEditorInput()))));
+ // Bug 538050
+ if (documentProvider != null && documentProvider.getDocument(editor.getEditorInput()) != null) {
+ shell.getDisplay().asyncExec(() -> editor
+ .setSpecfile(editor.getParser().parse(documentProvider.getDocument(editor.getEditorInput()))));
+ }
}
}

Back to the top