Bug 107874

Summary: new Boolean(boolean) -> Boolean.valueOf(boolean)
Product: [Eclipse Project] JDT Reporter: John Arthorne <john.arthorne>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 Keywords: performance
Version: 3.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description John Arthorne CLA 2005-08-24 11:36:38 EDT
There are many references in debug classes to new Boolean(boolean). Consider
reviewing these and replacing with Boolean.valueOf() that avoids object
creations.  If these objects are held onto for long periods, there is also a
space savings. Here are the current references I found:

org.ecli.debu.core.model.Breakpoint.setPersisted(boolean) (2 matches)
org.ecli.debu.inte.core.LaunchConfiguration.getMemento()
org.ecli.debu.inte.core.LaunchConfigurationWorkingCopy.setAttribute(String, boolean)
org.ecli.debu.inte.ui.launchConfigurations.CompileErrorProjectPromptStatusHandler.handleStatus(IStatus,
Object) (4 matches)
org.ecli.debu.inte.ui.launchConfigurations.CompileErrorPromptStatusHandler.handleStatus(IStatus,
Object) (4 matches)
org.ecli.debu.inte.ui.launchConfigurations.DebugModePromptStatusHandler.handleStatus(IStatus,
Object) (6 matches)
org.ecli.debu.inte.ui.launchConfigurations.LaunchConfigurationsDialog.saveEnableStateAndSet(Control,
Map, String, boolean)
org.ecli.debu.inte.ui.WorkingDirectoryStatusHandler.handleStatus(IStatus, Object)
org.ecli.jdi.internal.VirtualMachineImpl.mirrorOf(boolean)
org.ecli.jdt.debu.ui.JavaUISourceLocator.getMemento()
org.ecli.jdt.debu.ui.launchConfigurations.JavaConnectTab.performApply(ILaunchConfigurationWorkingCopy)
org.ecli.jdt.inte.debu.core.breakpoints.JavaExceptionBreakpoint.JavaExceptionBreakpoint(IResource,
String, boolean, boolean, boolean, boolean, Map) (3 matches)
org.ecli.jdt.inte.debu.core.breakpoints.JavaExceptionBreakpoint.setCaughtAndUncaught(boolean,
boolean) (2 matches)
org.ecli.jdt.inte.debu.core.breakpoints.JavaLineBreakpoint.addLineBreakpointAttributes(Map,
String, boolean, int, int, int)
org.ecli.jdt.inte.debu.core.breakpoints.JavaLineBreakpoint.setConditionEnabled(boolean)
org.ecli.jdt.inte.debu.core.breakpoints.JavaLineBreakpoint.setConditionSuspendOnTrue(boolean)
org.ecli.jdt.inte.debu.core.breakpoints.JavaMethodBreakpoint.JavaMethodBreakpoint(IResource,
String, String, String, boolean, boolean, boolean, int, int, int, int, boolean,
Map) (3 matches)
org.ecli.jdt.inte.debu.core.breakpoints.JavaMethodBreakpoint.usesTypePattern()
org.ecli.jdt.inte.debu.eval.ast.instructions.PlusOperator.getString(IJavaValue, int)
org.ecli.jdt.inte.debu.ui.launcher.VMConnectTimeoutStatusHandler.handleStatus(IStatus,
Object)
org.ecli.jdt.inte.debu.ui.propertypages.InstanceFilterEditor.createViewer()
Comment 1 Darin Swanson CLA 2005-08-24 12:00:55 EDT
Not sure of your definition of current :-)

These were all covered and have been fixed via bug 99753.

*** This bug has been marked as a duplicate of 99753 ***
Comment 2 John Arthorne CLA 2005-08-24 12:05:45 EDT
Sorry, I was on R3.1...