From d0fb4c417cfed348343c171e09063e596d06535e Mon Sep 17 00:00:00 2001 From: Constantine Plotnikov Date: Tue, 3 Aug 2010 11:28:00 +0400 Subject: [PATCH] git4idea: IDEA-57050: fixed ISE --- .../branches/GitBranchConfigurationChangedDialog.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/git4idea/src/git4idea/checkout/branches/GitBranchConfigurationChangedDialog.java b/plugins/git4idea/src/git4idea/checkout/branches/GitBranchConfigurationChangedDialog.java index 717ae4931284..3e545187dfbf 100644 --- a/plugins/git4idea/src/git4idea/checkout/branches/GitBranchConfigurationChangedDialog.java +++ b/plugins/git4idea/src/git4idea/checkout/branches/GitBranchConfigurationChangedDialog.java @@ -89,7 +89,7 @@ public class GitBranchConfigurationChangedDialog extends DialogWrapper { myTable.setModel(new DescriptorTableModel()); myNameTextField.setText(config.getName()); myNewAction = new DialogWrapperExitAction("New Configuration", NEW_CONFIGURATION); - myNameTextField.getDocument().addDocumentListener(new DocumentAdapter() { + final DocumentAdapter l = new DocumentAdapter() { @Override protected void textChanged(DocumentEvent e) { String text = myNameTextField.getText().trim(); @@ -113,8 +113,9 @@ public class GitBranchConfigurationChangedDialog extends DialogWrapper { setOKActionEnabled(s == null); myNewAction.setEnabled(s == null); } - }); - + }; + myNameTextField.getDocument().addDocumentListener(l); + l.changedUpdate(null); setOKButtonText("Update"); init(); }