diff options
| author | Dani Megert | 2014-11-18 13:05:25 +0000 |
|---|---|---|
| committer | Dani Megert | 2014-11-18 13:05:25 +0000 |
| commit | 9a0fa80f59bb56bcd64d35ace658655ea2d8c8f4 (patch) | |
| tree | 3ee6548d05b941a1032dfc26b30ae974905afc6f | |
| parent | 94f85f49f97873b37d3444cf7f2c003d71348970 (diff) | |
| download | eclipse.jdt.ui-9a0fa80f59bb56bcd64d35ace658655ea2d8c8f4.tar.gz eclipse.jdt.ui-9a0fa80f59bb56bcd64d35ace658655ea2d8c8f4.tar.xz eclipse.jdt.ui-9a0fa80f59bb56bcd64d35ace658655ea2d8c8f4.zip | |
Fixed bug 446604: [platform] IOOBE in OptionalMessageDialog.buttonPressedI20141125-0800I20141118-0830I20141118-0800
| -rw-r--r-- | org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/OptionalMessageDialog.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/OptionalMessageDialog.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/OptionalMessageDialog.java index aed11dd0f5..35b6bbd045 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/OptionalMessageDialog.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/dialogs/OptionalMessageDialog.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2012 IBM Corporation and others. + * Copyright (c) 2000, 2014 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -113,7 +113,9 @@ public class OptionalMessageDialog extends MessageDialog { @Override protected void buttonPressed(int buttonId) { super.buttonPressed(buttonId); - if (IDialogConstants.CANCEL_LABEL.equals(getButtonLabels()[getReturnCode()])) + String[] buttonLabels= getButtonLabels(); + int returnCode= getReturnCode(); + if (returnCode < buttonLabels.length && IDialogConstants.CANCEL_LABEL.equals(buttonLabels[returnCode])) setDialogEnabled(fId, true); // don't store if cancelled } |
