diff options
author | Alex Blewitt | 2015-06-17 08:31:18 +0000 |
---|---|---|
committer | Alex Blewitt | 2015-07-31 08:29:48 +0000 |
commit | daa59ae7f9eec005b257ef65c0361228e8fc34ec (patch) | |
tree | 299133a209f1e37630c0f3e3b1fc96f5d3ed4186 | |
parent | d4eadcca6620f0c222b2b101ca33f13d2fe92176 (diff) | |
download | eclipse.platform.team-daa59ae7f9eec005b257ef65c0361228e8fc34ec.tar.gz eclipse.platform.team-daa59ae7f9eec005b257ef65c0361228e8fc34ec.tar.xz eclipse.platform.team-daa59ae7f9eec005b257ef65c0361228e8fc34ec.zip |
Bug 470344 - Replace new Boolean with Boolean.valueOf
Using `new Boolean()` results in the creation of a new object on the
heap, when the flyweight `Boolean.TRUE` and `Boolean.FALSE` are available.
Java 1.4 added a `Boolean.valueOf()` which can be used in place of
`new Boolean()` but which will use the existing flyweight values instead.
Globally change `new Boolean(...)` to `Boolean.valueOf(...)` and replace
constant valued expressions with their flyweight counterparts. In-line
`Boolean.valueOf(true)` with `Boolean.TRUE`, c.f. false.
Bug: 470344
Change-Id: I673669144881f738006b8567e99e5760e851ad07
Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
14 files changed, 48 insertions, 34 deletions
diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java index 91298bafa..aba9779de 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/CompareConfiguration.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2015 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 @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Alex Blewitt <alex.blewitt@gmail.com> - replace new Boolean with Boolean.valueOf - https://bugs.eclipse.org/470344 *******************************************************************************/ package org.eclipse.compare; @@ -262,10 +263,10 @@ public class CompareConfiguration { fPreferenceStore= prefStore; if (fPreferenceStore != null) { boolean b= fPreferenceStore.getBoolean(ComparePreferencePage.INITIALLY_SHOW_ANCESTOR_PANE); - setProperty(ICompareUIConstants.PROP_ANCESTOR_VISIBLE, new Boolean(b)); + setProperty(ICompareUIConstants.PROP_ANCESTOR_VISIBLE, Boolean.valueOf(b)); b= fPreferenceStore.getBoolean(ComparePreferencePage.IGNORE_WHITESPACE); - setProperty(CompareConfiguration.IGNORE_WHITESPACE, new Boolean(b)); + setProperty(CompareConfiguration.IGNORE_WHITESPACE, Boolean.valueOf(b)); } } diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/Splitter.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/Splitter.java index 9e0d6e12b..ca19ffdb6 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/Splitter.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/Splitter.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2015 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 @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Alex Blewitt <alex.blewitt@gmail.com> - replace new Boolean with Boolean.valueOf - https://bugs.eclipse.org/470344 *******************************************************************************/ package org.eclipse.compare; @@ -70,7 +71,7 @@ public class Splitter extends SashForm { boolean wasEmpty= isEmpty(); child.setVisible(visible); - child.setData(VISIBILITY, new Boolean(visible)); + child.setData(VISIBILITY, Boolean.valueOf(visible)); if (wasEmpty != isEmpty()) { // recursively walk up diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java index 8d2d262e6..1958bf4eb 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/contentmergeviewer/ContentMergeViewer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2014 IBM Corporation and others. + * Copyright (c) 2000, 2015 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 @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Alex Blewitt <alex.blewitt@gmail.com> - replace new Boolean with Boolean.valueOf - https://bugs.eclipse.org/470344 *******************************************************************************/ package org.eclipse.compare.contentmergeviewer; @@ -600,7 +601,7 @@ public abstract class ContentMergeViewer extends ContentViewer action.setEnabled(enabled); } } - getCompareConfiguration().setProperty(ICompareUIConstants.PROP_ANCESTOR_VISIBLE, new Boolean(visible)); + getCompareConfiguration().setProperty(ICompareUIConstants.PROP_ANCESTOR_VISIBLE, Boolean.valueOf(visible)); } //---- input @@ -1125,7 +1126,7 @@ public abstract class ContentMergeViewer extends ContentViewer } private void fireDirtyState(boolean state) { - Utilities.firePropertyChange(fListenerList, this, CompareEditorInput.DIRTY_STATE, null, new Boolean(state)); + Utilities.firePropertyChange(fListenerList, this, CompareEditorInput.DIRTY_STATE, null, Boolean.valueOf(state)); } /** diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ChangePropertyAction.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ChangePropertyAction.java index f4f8ab38c..7efc7b371 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ChangePropertyAction.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ChangePropertyAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2015 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 @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Alex Blewitt <alex.blewitt@gmail.com> - replace new Boolean with Boolean.valueOf - https://bugs.eclipse.org/470344 *******************************************************************************/ package org.eclipse.compare.internal; @@ -48,7 +49,7 @@ public class ChangePropertyAction extends Action implements IPropertyChangeListe boolean b= !Utilities.getBoolean(fCompareConfiguration, fPropertyKey, false); setChecked(b); if (fCompareConfiguration != null) - fCompareConfiguration.setProperty(fPropertyKey, new Boolean(b)); + fCompareConfiguration.setProperty(fPropertyKey, Boolean.valueOf(b)); } public void setChecked(boolean state) { diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareAction.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareAction.java index 3c333048e..b9a557f3c 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareAction.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2011 IBM Corporation and others. + * Copyright (c) 2000, 2015 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 @@ -9,6 +9,7 @@ * IBM Corporation - initial API and implementation * Matt McCutchen (hashproduct+eclipse@gmail.com) - Bug 35390 Three-way compare cannot select (mis-selects) )ancestor resource * Aleksandra Wozniak (aleksandra.k.wozniak@gmail.com) - Bug 239959 + * Alex Blewitt <alex.blewitt@gmail.com> - replace new Boolean with Boolean.valueOf - https://bugs.eclipse.org/470344 *******************************************************************************/ package org.eclipse.compare.internal; @@ -48,10 +49,10 @@ public class CompareAction extends BaseCompareAction implements IObjectActionDel CompareConfiguration cc= new CompareConfiguration(); // buffered merge mode: don't ask for confirmation // when switching between modified resources - cc.setProperty(CompareEditor.CONFIRM_SAVE_PROPERTY, new Boolean(false)); + cc.setProperty(CompareEditor.CONFIRM_SAVE_PROPERTY, Boolean.FALSE); // uncomment following line to have separate outline view - //cc.setProperty(CompareConfiguration.USE_OUTLINE_VIEW, new Boolean(true)); + //cc.setProperty(CompareConfiguration.USE_OUTLINE_VIEW, Boolean.TRUE); fInput= new ResourceCompareInput(cc); } diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java index b43129f82..8fe2bee11 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/ComparePreferencePage.java @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Alex Blewitt <alex.blewitt@gmail.com> - replace new Boolean with Boolean.valueOf - https://bugs.eclipse.org/470344 *******************************************************************************/ package org.eclipse.compare.internal; @@ -167,7 +168,7 @@ public class ComparePreferencePage extends PreferencePage implements IWorkbenchP if (key.equals(INITIALLY_SHOW_ANCESTOR_PANE)) { boolean b= fOverlayStore.getBoolean(INITIALLY_SHOW_ANCESTOR_PANE); if (fCompareConfiguration != null) { - fCompareConfiguration.setProperty(INITIALLY_SHOW_ANCESTOR_PANE, new Boolean(b)); + fCompareConfiguration.setProperty(INITIALLY_SHOW_ANCESTOR_PANE, Boolean.valueOf(b)); } } } diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithOtherResourceHandler.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithOtherResourceHandler.java index 75df374d2..74a57deb1 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithOtherResourceHandler.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/CompareWithOtherResourceHandler.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2011 IBM Corporation and others. + * Copyright (c) 2009, 2015 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 @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Alex Blewitt <alex.blewitt@gmail.com> - replace new Boolean with Boolean.valueOf - https://bugs.eclipse.org/470344 *******************************************************************************/ package org.eclipse.compare.internal; @@ -32,7 +33,7 @@ public class CompareWithOtherResourceHandler extends AbstractHandler { // CompareAction#isEnabled(ISelection) CompareConfiguration cc = new CompareConfiguration(); - cc.setProperty(CompareEditor.CONFIRM_SAVE_PROPERTY, new Boolean(false)); + cc.setProperty(CompareEditor.CONFIRM_SAVE_PROPERTY, Boolean.FALSE); ResourceCompareInput input = new ResourceCompareInput(cc); int selectionSize = 0; @@ -49,4 +50,4 @@ public class CompareWithOtherResourceHandler extends AbstractHandler { } return null; } -}
\ No newline at end of file +} diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/DocumentMerger.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/DocumentMerger.java index ef7bf0223..3f7938ecc 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/DocumentMerger.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/merge/DocumentMerger.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 IBM Corporation and others. + * Copyright (c) 2007, 2015 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 @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Alex Blewitt <alex.blewitt@gmail.com> - replace new Boolean with Boolean.valueOf - https://bugs.eclipse.org/470344 *******************************************************************************/ package org.eclipse.compare.internal.merge; @@ -492,11 +493,11 @@ public class DocumentMerger { if (isCapped(sa, sl, sr)) fInput.getCompareConfiguration().setProperty( CompareContentViewerSwitchingPane.OPTIMIZED_ALGORITHM_USED, - new Boolean(true)); + Boolean.TRUE); else fInput.getCompareConfiguration().setProperty( CompareContentViewerSwitchingPane.OPTIMIZED_ALGORITHM_USED, - new Boolean(false)); + Boolean.FALSE); ArrayList newAllDiffs = new ArrayList(); for (int i= 0; i < e.length; i++) { diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareEditorInput.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareEditorInput.java index c905a6d84..185e5e034 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareEditorInput.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PatchCompareEditorInput.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2011 IBM Corporation and others. + * Copyright (c) 2005, 2015 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 @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Alex Blewitt <alex.blewitt@gmail.com> - replace new Boolean with Boolean.valueOf - https://bugs.eclipse.org/470344 *******************************************************************************/ package org.eclipse.compare.internal.patch; @@ -196,7 +197,7 @@ public abstract class PatchCompareEditorInput extends CompareEditorInput { // set left editable so that unmatched hunks can be edited cc.setLeftEditable(true); cc.setRightEditable(false); - //cc.setProperty(CompareEditor.CONFIRM_SAVE_PROPERTY, new Boolean(false)); + //cc.setProperty(CompareEditor.CONFIRM_SAVE_PROPERTY, Boolean.FALSE); cc.setLeftLabel(getCompareConfiguration().getLeftLabel(root)); cc.setLeftImage(getCompareConfiguration().getLeftImage(root)); cc.setRightLabel(getCompareConfiguration().getRightLabel(root)); diff --git a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage2.java b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage2.java index f4201ef60..5d03024fb 100644 --- a/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage2.java +++ b/bundles/org.eclipse.compare/compare/org/eclipse/compare/internal/patch/PreviewPatchPage2.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2005, 2012 IBM Corporation and others. + * Copyright (c) 2005, 2015 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 @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Alex Blewitt <alex.blewitt@gmail.com> - replace new Boolean with Boolean.valueOf - https://bugs.eclipse.org/470344 *******************************************************************************/ package org.eclipse.compare.internal.patch; @@ -295,7 +296,7 @@ public class PreviewPatchPage2 extends WizardPage { if (isChecked() != getPatcher().isIgnoreWhitespace()) { if (promptToRebuild(PatchMessages.PreviewPatchPage2_2)) { if (getPatcher().setIgnoreWhitespace(isChecked())){ - getCompareConfiguration().setProperty(CompareConfiguration.IGNORE_WHITESPACE, new Boolean(isChecked())); + getCompareConfiguration().setProperty(CompareConfiguration.IGNORE_WHITESPACE, Boolean.valueOf(isChecked())); } } else { fIgnoreWhiteSpace.setChecked(!isChecked()); diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IEditorInputTester.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IEditorInputTester.java index 1fd1cd2a7..457904b69 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IEditorInputTester.java +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/IEditorInputTester.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009 IBM Corporation and others. + * Copyright (c) 2009, 2015 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 @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Alex Blewitt <alex.blewitt@gmail.com> - replace new Boolean with Boolean.valueOf - https://bugs.eclipse.org/470344 *******************************************************************************/ package org.eclipse.team.internal.ccvs.ui; @@ -33,11 +34,11 @@ public class IEditorInputTester extends PropertyTester { ICVSResource cvsResource = CVSWorkspaceRoot .getCVSResourceFor(file); try { - actual = new Boolean((cvsResource != null + actual = Boolean.valueOf((cvsResource != null && !cvsResource.isFolder() && cvsResource .isManaged())); } catch (CVSException e) { - actual = new Boolean(isEnabledForException(e)); + actual = Boolean.valueOf(isEnabledForException(e)); } return (actual.equals(expectedValue)); } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/GererateRejFileAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/GererateRejFileAction.java index 23dc6bca8..898c3e1f1 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/GererateRejFileAction.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/GererateRejFileAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 IBM Corporation and others. + * Copyright (c) 2010, 2015 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 @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Alex Blewitt <alex.blewitt@gmail.com> - replace new Boolean with Boolean.valueOf - https://bugs.eclipse.org/470344 *******************************************************************************/ package org.eclipse.team.internal.ui.mapping; @@ -35,7 +36,7 @@ public class GererateRejFileAction extends Action { boolean oldValue = subscriber.getPatcher().isGenerateRejectFile(); subscriber.getPatcher().setGenerateRejectFile(!oldValue); - firePropertyChange(CHECKED, new Boolean(oldValue), new Boolean( + firePropertyChange(CHECKED, Boolean.valueOf(oldValue), Boolean.valueOf( !oldValue)); } diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ReversePatchAction.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ReversePatchAction.java index 27ddc8547..1d3822b98 100644 --- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ReversePatchAction.java +++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/mapping/ReversePatchAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010 IBM Corporation and others. + * Copyright (c) 2010, 2015 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 @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Alex Blewitt <alex.blewitt@gmail.com> - replace new Boolean with Boolean.valueOf - https://bugs.eclipse.org/470344 *******************************************************************************/ package org.eclipse.team.internal.ui.mapping; @@ -45,7 +46,7 @@ public class ReversePatchAction extends Action { participant.refresh(configuration.getSite().getWorkbenchSite(), context .getScope().getMappings()); - firePropertyChange(CHECKED, new Boolean(oldValue), new Boolean( + firePropertyChange(CHECKED, Boolean.valueOf(oldValue), Boolean.valueOf( !oldValue)); } diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PatchWizardRadioButtonGroupTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PatchWizardRadioButtonGroupTests.java index 670ec876c..ebd5b2b04 100644 --- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PatchWizardRadioButtonGroupTests.java +++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/PatchWizardRadioButtonGroupTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2009 IBM Corporation and others. + * Copyright (c) 2007, 2015 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 @@ -7,6 +7,7 @@ * * Contributors: * IBM Corporation - initial API and implementation + * Alex Blewitt <alex.blewitt@gmail.com> - replace new Boolean with Boolean.valueOf - https://bugs.eclipse.org/470344 *******************************************************************************/ package org.eclipse.team.tests.ccvs.ui; @@ -341,7 +342,7 @@ public class PatchWizardRadioButtonGroupTests extends TestCase { Method method = clazz.getMethod("setEnablement", partypes); method.setAccessible(true); Object arglist[] = new Object[3]; - arglist[0] = new Boolean(enabled); + arglist[0] = Boolean.valueOf(enabled); arglist[1] = buttonsToChange; arglist[2] = new Integer(defaultSelection); method.invoke(groupObject, arglist); @@ -366,7 +367,7 @@ public class PatchWizardRadioButtonGroupTests extends TestCase { Method method = clazz.getMethod("setEnablement", partypes); method.setAccessible(true); Object arglist[] = new Object[2]; - arglist[0] = new Boolean(enabled); + arglist[0] = Boolean.valueOf(enabled); arglist[1] = buttonsToChange; method.invoke(groupObject, arglist); } catch (SecurityException e) { |