From 8a770e3e9eb25689949495f5cc08f2dacf89ad5c Mon Sep 17 00:00:00 2001 From: Mathias Kinzler Date: Mon, 26 Apr 2010 19:26:46 +0200 Subject: [PATCH] NullPointerException during Push This is a bug in the RefSpecPage that leads to a NPE being logged. Change-Id: Ic02ea5c557fde959c6d20e0ba76bab16df350213 Signed-off-by: Mathias Kinzler Signed-off-by: Chris Aniszczyk --- .../egit/ui/internal/components/RefSpecPage.java | 35 +++++++++++----------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/RefSpecPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/RefSpecPage.java index 0447e095..74da3730 100644 --- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/RefSpecPage.java +++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/components/RefSpecPage.java @@ -272,28 +272,29 @@ public class RefSpecPage extends BaseWizardPage { specsPanel.setAssistanceData(local, listRemotesOp.getRemoteRefs(), actRemoteName); - if (!pushPage) { - tagsAutoFollowButton.setSelection(false); - tagsFetchTagsButton.setSelection(false); - tagsNoTagsButton.setSelection(false); - } - if (newRepoSelection.isConfigSelected()) { saveButton.setVisible(true); saveButton.setText(NLS.bind(UIText.RefSpecPage_saveSpecifications, actRemoteName)); saveButton.getParent().layout(); - final TagOpt tagOpt = newRepoSelection.getConfig().getTagOpt(); - switch (tagOpt) { - case AUTO_FOLLOW: - tagsAutoFollowButton.setSelection(true); - break; - case FETCH_TAGS: - tagsFetchTagsButton.setSelection(true); - break; - case NO_TAGS: - tagsNoTagsButton.setSelection(true); - break; + + if (!pushPage) { + tagsAutoFollowButton.setSelection(false); + tagsFetchTagsButton.setSelection(false); + tagsNoTagsButton.setSelection(false); + + final TagOpt tagOpt = newRepoSelection.getConfig().getTagOpt(); + switch (tagOpt) { + case AUTO_FOLLOW: + tagsAutoFollowButton.setSelection(true); + break; + case FETCH_TAGS: + tagsFetchTagsButton.setSelection(true); + break; + case NO_TAGS: + tagsNoTagsButton.setSelection(true); + break; + } } } else if (!pushPage) tagsAutoFollowButton.setSelection(true); -- 2.11.4.GIT