diff options
author | Jonah Graham | 2018-11-20 16:20:42 +0000 |
---|---|---|
committer | Jonah Graham | 2018-11-22 21:55:36 +0000 |
commit | caf2292768deccd885b5b6989b731742e2e5edf4 (patch) | |
tree | 711a6088f2e17c7e31ebb51af1eadc1af00768e5 /dsf-gdb/org.eclipse.cdt.dsf.gdb | |
parent | 8844a8f9f22802fedffa3cb2a8a21b041aa64b74 (diff) | |
download | org.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.tar.gz org.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.tar.xz org.eclipse.cdt-caf2292768deccd885b5b6989b731742e2e5edf4.zip |
Bug 540373: Cleanup: Remove redundant type arguments
This was done by selecting all projects in Eclipse then
Source -> Clean Up... -> choosing:
- Remove redundant type arguments
and completing the wizard
Change-Id: Iaecc7010f097b4b1fabd29ccaa34ccb23a716fbf
Diffstat (limited to 'dsf-gdb/org.eclipse.cdt.dsf.gdb')
75 files changed, 176 insertions, 176 deletions
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/breakpoints/CBreakpointGdbThreadsFilterExtension.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/breakpoints/CBreakpointGdbThreadsFilterExtension.java index fe1c79de813..7018137333c 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/breakpoints/CBreakpointGdbThreadsFilterExtension.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/breakpoints/CBreakpointGdbThreadsFilterExtension.java @@ -104,7 +104,7 @@ public class CBreakpointGdbThreadsFilterExtension implements IDsfBreakpointExten public void setThreadFilters(IExecutionDMContext[] threads) throws CoreException { if (threads != null && threads.length > 0) { IContainerDMContext target = DMContexts.getAncestorOfType(threads[0], IContainerDMContext.class); - fFilteredThreadsByTarget.put(target, new HashSet<IExecutionDMContext>(Arrays.asList(threads))); + fFilteredThreadsByTarget.put(target, new HashSet<>(Arrays.asList(threads))); } } diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/CoreList.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/CoreList.java index 35bd9a7dbaf..0b091fd9ea8 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/CoreList.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/CoreList.java @@ -79,7 +79,7 @@ public class CoreList { private void getCoreListFromFile() { File cpuInfo = new File(fCoreFileName); - Vector<ICoreInfo> coreInfo = new Vector<ICoreInfo>(); + Vector<ICoreInfo> coreInfo = new Vector<>(); BufferedReader reader = null; try { String processorId = null; @@ -134,7 +134,7 @@ public class CoreList { } private void getCoreListFromResourceInfo() { - Vector<ICoreInfo> coreInfo = new Vector<ICoreInfo>(); + Vector<ICoreInfo> coreInfo = new Vector<>(); int processorIdIndex = -1; int physicalIdIndex = -1; diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/GdbDebugOptions.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/GdbDebugOptions.java index 05ec17c3be8..3e2c646cb82 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/GdbDebugOptions.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/GdbDebugOptions.java @@ -51,7 +51,7 @@ public class GdbDebugOptions implements DebugOptionsListener { * Constructor */ public GdbDebugOptions(BundleContext context) { - Hashtable<String, String> props = new Hashtable<String, String>(2); + Hashtable<String, String> props = new Hashtable<>(2); props.put(org.eclipse.osgi.service.debug.DebugOptions.LISTENER_SYMBOLICNAME, GdbPlugin.getUniqueIdentifier()); context.registerService(DebugOptionsListener.class.getName(), this, props); } diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/ProcStatCoreLoads.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/ProcStatCoreLoads.java index 9315a3ffe78..fcabd048633 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/ProcStatCoreLoads.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/ProcStatCoreLoads.java @@ -25,7 +25,7 @@ public class ProcStatCoreLoads { private Map<String, Float> m_coreLoads; public ProcStatCoreLoads() { - m_coreLoads = new HashMap<String, Float>(); + m_coreLoads = new HashMap<>(); } public void put(String coreId, Float load) { diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/ProcStatCounters.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/ProcStatCounters.java index c6266e8f674..4a47d1acfe7 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/ProcStatCounters.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/ProcStatCounters.java @@ -22,7 +22,7 @@ import java.util.Map; * TODO: extend to more than the tick counters. */ public class ProcStatCounters { - private Map<String, OneCoreTickCounters> fTickCounters = new HashMap<String, OneCoreTickCounters>(); + private Map<String, OneCoreTickCounters> fTickCounters = new HashMap<>(); /** * An object of this class holds one set of core/CPU tick counter values, for a single CPU core @@ -70,7 +70,7 @@ public class ProcStatCounters { * */ public ProcStatCounters() { - fTickCounters = new HashMap<String, OneCoreTickCounters>(); + fTickCounters = new HashMap<>(); } /** diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/ProcStatParser.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/ProcStatParser.java index beedd9c562f..f54af2e537a 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/ProcStatParser.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/ProcStatParser.java @@ -67,7 +67,7 @@ public class ProcStatParser { // catch "cpu" lines from /proc/stat Matcher matcherCpu = patternCpu.matcher(line); if (matcherCpu.find()) { - Vector<Integer> ticks = new Vector<Integer>(); + Vector<Integer> ticks = new Vector<>(); coreId = matcherCpu.group(1); // extract the counters for current cpu line for (String tick : matcherCpu.group(2).trim().split("\\s+")) { //$NON-NLS-1$ diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryAddressInfoRegistersRetrieval.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryAddressInfoRegistersRetrieval.java index 6baf5cbaf47..ed8aeed455e 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryAddressInfoRegistersRetrieval.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryAddressInfoRegistersRetrieval.java @@ -118,7 +118,7 @@ public class GdbMemoryAddressInfoRegistersRetrieval implements IGdbMemoryAddress // memSpaceId = ((IMemorySpaceAwareMemoryBlock) memBlock).getMemorySpaceID(); // } - List<IMemoryBlockAddressInfoItem> items = new ArrayList<IMemoryBlockAddressInfoItem>(); + List<IMemoryBlockAddressInfoItem> items = new ArrayList<>(); // Remove all items with value zero for (IMemoryBlockAddressInfoItem item : regDataContainers) { if (item.getAddress().intValue() != 0) { diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryAddressInfoVariablesRetrieval.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryAddressInfoVariablesRetrieval.java index 9b5274e8e0c..94a890453cb 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryAddressInfoVariablesRetrieval.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryAddressInfoVariablesRetrieval.java @@ -136,7 +136,7 @@ public class GdbMemoryAddressInfoVariablesRetrieval implements IGdbMemoryAddress // Create a List in which we store the DM data objects for the local variables. This is // necessary because there is no MultiDataRequestMonitor. :) - final List<IVariableDMData> localsDMData = new ArrayList<IVariableDMData>(); + final List<IVariableDMData> localsDMData = new ArrayList<>(); // Create the MultiRequestMonitor to handle completion of the set of getModelData() calls. @@ -262,7 +262,7 @@ public class GdbMemoryAddressInfoVariablesRetrieval implements IGdbMemoryAddress String ctxDefaultMemSpaceId) { int length = contentsBins.length; - final List<IMemoryBlockAddressInfoItem> infoItems = new ArrayList<IMemoryBlockAddressInfoItem>(); + final List<IMemoryBlockAddressInfoItem> infoItems = new ArrayList<>(); // Resolve the memory space id of the memory block String memBlockMemSpaceId = EMPTY_STRING; diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryBlockRetrieval.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryBlockRetrieval.java index 087efd478c0..c0f8e14f2e7 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryBlockRetrieval.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/memory/GdbMemoryBlockRetrieval.java @@ -466,7 +466,7 @@ public class GdbMemoryBlockRetrieval extends DsfMemoryBlockRetrieval implements // Process the block list specific to this memory context // FIXME: (Bug228573) We only process the first entry... if (root.getAttribute(ATTR_EXPRESSION_LIST_CONTEXT).equals(CONTEXT_RESERVED)) { - List<IMemoryBlock> blocks = new ArrayList<IMemoryBlock>(); + List<IMemoryBlock> blocks = new ArrayList<>(); NodeList expressionList = root.getChildNodes(); int length = expressionList.getLength(); for (int i = 0; i < length; ++i) { diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/tracepointactions/TracepointActionManager.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/tracepointactions/TracepointActionManager.java index 0fa2c688af3..02de3bb747c 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/tracepointactions/TracepointActionManager.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/internal/tracepointactions/TracepointActionManager.java @@ -74,7 +74,7 @@ public class TracepointActionManager { public ArrayList<ITracepointAction> getActions() { if (tracepointActions == null) { - tracepointActions = new ArrayList<ITracepointAction>(); + tracepointActions = new ArrayList<>(); loadActionData(); } return tracepointActions; diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence_7_0.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence_7_0.java index f4d2d140116..0a0a83e62a4 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence_7_0.java @@ -57,7 +57,7 @@ public class FinalLaunchSequence_7_0 extends FinalLaunchSequence { if (GROUP_TOP_LEVEL.equals(group)) { // Initialize the list with the base class' steps // We need to create a list that we can modify, which is why we create our own ArrayList. - List<String> orderList = new ArrayList<String>(Arrays.asList(super.getExecutionOrder(GROUP_TOP_LEVEL))); + List<String> orderList = new ArrayList<>(Arrays.asList(super.getExecutionOrder(GROUP_TOP_LEVEL))); // Now insert our steps right after the initialization of the base class. orderList.add(orderList.indexOf("stepInitializeFinalLaunchSequence") + 1, //$NON-NLS-1$ diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence_7_12.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence_7_12.java index a3932deb844..3cd02b138e2 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence_7_12.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence_7_12.java @@ -52,7 +52,7 @@ public class FinalLaunchSequence_7_12 extends FinalLaunchSequence_7_7 { if (GROUP_TOP_LEVEL.equals(group)) { // Initialize the list with the base class' steps // We need to create a list that we can modify, which is why we create our own ArrayList. - List<String> orderList = new ArrayList<String>(Arrays.asList(super.getExecutionOrder(GROUP_TOP_LEVEL))); + List<String> orderList = new ArrayList<>(Arrays.asList(super.getExecutionOrder(GROUP_TOP_LEVEL))); // Now insert our steps right after the initialization of the base class. orderList.add(orderList.indexOf("stepInitializeFinalLaunchSequence_7_7") + 1, //$NON-NLS-1$ diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence_7_2.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence_7_2.java index 41763985f82..96276634c92 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence_7_2.java @@ -52,7 +52,7 @@ public class FinalLaunchSequence_7_2 extends FinalLaunchSequence_7_0 { if (GROUP_TOP_LEVEL.equals(group)) { // Initialize the list with the base class' steps // We need to create a list that we can modify, which is why we create our own ArrayList. - List<String> orderList = new ArrayList<String>(Arrays.asList(super.getExecutionOrder(GROUP_TOP_LEVEL))); + List<String> orderList = new ArrayList<>(Arrays.asList(super.getExecutionOrder(GROUP_TOP_LEVEL))); // Now insert our steps right after the initialization of the base class. orderList.add(orderList.indexOf("stepInitializeFinalLaunchSequence_7_0") + 1, //$NON-NLS-1$ diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence_7_7.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence_7_7.java index 98bc35f9a78..3a42f5782c8 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence_7_7.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/FinalLaunchSequence_7_7.java @@ -49,7 +49,7 @@ public class FinalLaunchSequence_7_7 extends FinalLaunchSequence_7_2 { if (GROUP_TOP_LEVEL.equals(group)) { // Initialize the list with the base class' steps // We need to create a list that we can modify, which is why we create our own ArrayList. - List<String> orderList = new ArrayList<String>(Arrays.asList(super.getExecutionOrder(GROUP_TOP_LEVEL))); + List<String> orderList = new ArrayList<>(Arrays.asList(super.getExecutionOrder(GROUP_TOP_LEVEL))); // Now insert our steps right after the initialization of the base class. orderList.add(orderList.indexOf("stepInitializeFinalLaunchSequence_7_2") + 1, //$NON-NLS-1$ diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunch.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunch.java index 9b7af989956..9208008cc9d 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunch.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunch.java @@ -223,7 +223,7 @@ public class GdbLaunch extends DsfLaunch implements ITerminate, IDisconnect, ITr // the overrideable process factory to allow others to override. // First set attribute to specify we want to create the gdb process. // Bug 210366 - Map<String, String> attributes = new HashMap<String, String>(); + Map<String, String> attributes = new HashMap<>(); attributes.put(IGdbDebugConstants.PROCESS_TYPE_CREATION_ATTR, IGdbDebugConstants.GDB_PROCESS_CREATION_VALUE); DebugPlugin.newProcess(this, gdbProc, label, attributes); @@ -633,7 +633,7 @@ public class GdbLaunch extends DsfLaunch implements ITerminate, IDisconnect, ITr public String[] getLaunchEnvironment() throws CoreException { IProject project = getProject(); - HashMap<String, String> envMap = new HashMap<String, String>(); + HashMap<String, String> envMap = new HashMap<>(); ICProjectDescription projDesc = CoreModel.getDefault().getProjectDescription(project, false); if (projDesc != null) { String buildConfigID = getLaunchConfiguration() @@ -675,7 +675,7 @@ public class GdbLaunch extends DsfLaunch implements ITerminate, IDisconnect, ITr } // Turn it into an envp format - List<String> strings = new ArrayList<String>(envMap.size()); + List<String> strings = new ArrayList<>(envMap.size()); for (Entry<String, String> entry : envMap.entrySet()) { StringBuilder buffer = new StringBuilder(entry.getKey()); buffer.append('=').append(entry.getValue()); diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/LaunchUtils.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/LaunchUtils.java index 9b777cb2bd9..b67cc2665b0 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/LaunchUtils.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/LaunchUtils.java @@ -529,7 +529,7 @@ public class LaunchUtils { } // Environment variables and inherited vars - HashMap<String, String> envMap = new HashMap<String, String>(); + HashMap<String, String> envMap = new HashMap<>(); IEnvironmentVariable[] vars = CCorePlugin.getDefault().getBuildEnvironmentManager().getVariables(cfg, true); for (IEnvironmentVariable var : vars) { envMap.put(var.getName(), var.getValue()); @@ -551,7 +551,7 @@ public class LaunchUtils { } // Turn it into an envp format - List<String> strings = new ArrayList<String>(envMap.size()); + List<String> strings = new ArrayList<>(envMap.size()); for (Entry<String, String> entry : envMap.entrySet()) { StringBuilder buffer = new StringBuilder(entry.getKey()); buffer.append('=').append(entry.getValue()); diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/ShutdownSequence.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/ShutdownSequence.java index 3833bdff77e..ce8729b5cbb 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/ShutdownSequence.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/ShutdownSequence.java @@ -90,7 +90,7 @@ public class ShutdownSequence extends Sequence { String.format("(%s=%s)", IDsfService.PROP_SESSION_ID, fSessionId).intern()); //$NON-NLS-1$ if (serviceRefs != null) { - List<IDsfService> services = new ArrayList<IDsfService>(serviceRefs.length); + List<IDsfService> services = new ArrayList<>(serviceRefs.length); for (ServiceReference<?> ref : serviceRefs) { Object serviceObj = GdbPlugin.getBundleContext().getService(ref); if (serviceObj instanceof IDsfService) { diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/DebugNewProcessSequence_7_2.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/DebugNewProcessSequence_7_2.java index c2918cbda48..ea63c59f8d5 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/DebugNewProcessSequence_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/DebugNewProcessSequence_7_2.java @@ -66,7 +66,7 @@ public class DebugNewProcessSequence_7_2 extends DebugNewProcessSequence { if (GROUP_TOP_LEVEL.equals(group)) { // Initialize the list with the base class' steps // We need to create a list that we can modify, which is why we create our own ArrayList. - List<String> orderList = new ArrayList<String>(Arrays.asList(super.getExecutionOrder(GROUP_TOP_LEVEL))); + List<String> orderList = new ArrayList<>(Arrays.asList(super.getExecutionOrder(GROUP_TOP_LEVEL))); // Now insert our steps right after the initialization of the base class. orderList.add(orderList.indexOf("stepInitializeBaseSequence") + 1, "stepInitializeSequence_7_2"); //$NON-NLS-1$ //$NON-NLS-2$ diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBreakpoints_7_0.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBreakpoints_7_0.java index 2b52817c0fe..0b7ed1dd454 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBreakpoints_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBreakpoints_7_0.java @@ -288,7 +288,7 @@ public class GDBBreakpoints_7_0 extends MIBreakpoints { // Also, tracepoints are created with no passcount. // We have to set the passcount manually now. // Same for commands. - Map<String, Object> delta = new HashMap<String, Object>(); + Map<String, Object> delta = new HashMap<>(); delta.put(MIBreakpoints.IS_ENABLED, getProperty(attributes, MIBreakpoints.IS_ENABLED, true)); delta.put(MIBreakpoints.PASS_COUNT, @@ -393,7 +393,7 @@ public class GDBBreakpoints_7_0 extends MIBreakpoints { return; } - ArrayList<String> actionStrings = new ArrayList<String>(); + ArrayList<String> actionStrings = new ArrayList<>(); for (ITracepointAction action : actions) { if (action != null) { actionStrings.add(action.getSummary()); diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBreakpoints_7_2.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBreakpoints_7_2.java index 5e0491fc403..c3006c344a7 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBreakpoints_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBBreakpoints_7_2.java @@ -256,7 +256,7 @@ public class GDBBreakpoints_7_2 extends GDBBreakpoints_7_0 { // the same thing as ignore-count, which is not supported by // tracepoints). We have to set the passcount manually now. // Same for commands. - Map<String, Object> delta = new HashMap<String, Object>(); + Map<String, Object> delta = new HashMap<>(); delta.put(MIBreakpoints.PASS_COUNT, getProperty(attributes, MIBreakpoints.PASS_COUNT, 0)); delta.put(MIBreakpoints.COMMANDS, getProperty(attributes, MIBreakpoints.COMMANDS, "")); //$NON-NLS-1$ modifyBreakpoint(dmc, delta, drm, false); diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBHardwareAndOS.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBHardwareAndOS.java index 20012763ca3..7b7f2c5422a 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBHardwareAndOS.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBHardwareAndOS.java @@ -289,7 +289,7 @@ public class GDBHardwareAndOS extends AbstractDsfService implements IGDBHardware // handle getting the required cpu info fFetchCPUInfoCache = new CommandCache(getSession(), new CPUInfoManager()); fFetchCPUInfoCache.setContextAvailable(fCommandControl.getContext(), true); - fLoadInfoRequestCache = new HashMap<IDMContext, DataRequestMonitor<ILoadInfo>>(); + fLoadInfoRequestCache = new HashMap<>(); getSession().addServiceEventListener(this, null); @@ -400,7 +400,7 @@ public class GDBHardwareAndOS extends AbstractDsfService implements IGDBHardware * Parse the CoreInfo and create the CPU Contexts for the hardwareTarget context. */ ICPUDMContext[] parseCoresInfoForCPUs(IHardwareTargetDMContext dmc, ICoreInfo[] coresInfo) { - Set<String> cpuIds = new HashSet<String>(); + Set<String> cpuIds = new HashSet<>(); ICPUDMContext[] CPUs; for (ICoreInfo core : coresInfo) { @@ -420,7 +420,7 @@ public class GDBHardwareAndOS extends AbstractDsfService implements IGDBHardware */ ICoreDMContext[] parseCoresInfoForCores(ICPUDMContext cpuDmc, ICoreInfo[] coresInfo) { - Vector<ICoreDMContext> coreDmcs = new Vector<ICoreDMContext>(); + Vector<ICoreDMContext> coreDmcs = new Vector<>(); for (ICoreInfo core : coresInfo) { if (core.getPhysicalId().equals(cpuDmc.getId())) { // This core belongs to the right CPU @@ -476,7 +476,7 @@ public class GDBHardwareAndOS extends AbstractDsfService implements IGDBHardware * information we need. */ private class CPUInfoManager implements ICommandControl { - private final List<ICommandListener> fCommandProcessors = new ArrayList<ICommandListener>(); + private final List<ICommandListener> fCommandProcessors = new ArrayList<>(); @Override public <V extends ICommandResult> ICommandToken queueCommand(final ICommand<V> command, @@ -533,7 +533,7 @@ public class GDBHardwareAndOS extends AbstractDsfService implements IGDBHardware @Override protected void handleSuccess() { // First extract the string id for every core GDB reports - Set<String> coreIds = new HashSet<String>(); + Set<String> coreIds = new HashSet<>(); IThreadGroupInfo[] groups = getData().getGroupList(); for (IThreadGroupInfo group : groups) { coreIds.addAll(Arrays.asList(group.getCores())); diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBMemory.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBMemory.java index 7576a4ff969..449385045fd 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBMemory.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBMemory.java @@ -60,12 +60,12 @@ public class GDBMemory extends MIMemory implements IGDBMemory2 { /** * Cache of the address sizes for each memory context. */ - private Map<IMemoryDMContext, Integer> fAddressSizes = new HashMap<IMemoryDMContext, Integer>(); + private Map<IMemoryDMContext, Integer> fAddressSizes = new HashMap<>(); /** * Cache of the addressable sizes for each memory context. */ - private Map<IMemoryDMContext, Integer> fAddressableSizes = new HashMap<IMemoryDMContext, Integer>(); + private Map<IMemoryDMContext, Integer> fAddressableSizes = new HashMap<>(); /** * Cache of the endianness for each memory context. @@ -136,7 +136,7 @@ public class GDBMemory extends MIMemory implements IGDBMemory2 { private Step[] steps = null; private void determineSteps() { - ArrayList<Step> stepsList = new ArrayList<Step>(); + ArrayList<Step> stepsList = new ArrayList<>(); if (fAddressSizes.get(memContext) == null) { stepsList.add(new Step() { diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBPatternMatchingExpressions.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBPatternMatchingExpressions.java index 79a778f04e2..283436182db 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBPatternMatchingExpressions.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBPatternMatchingExpressions.java @@ -197,7 +197,7 @@ public class GDBPatternMatchingExpressions extends AbstractDsfService implements @Override public Map<String, Integer> getEnumerations() { - return new HashMap<String, Integer>(); + return new HashMap<>(); } @Override @@ -618,7 +618,7 @@ public class GDBPatternMatchingExpressions extends AbstractDsfService implements // Remove any extra whitespace from each resulting expression, // and ignore any empty expressions. - List<String> expressions = new ArrayList<String>(splitExpressions.length); + List<String> expressions = new ArrayList<>(splitExpressions.length); for (String expr : splitExpressions) { expr = expr.trim(); if (!expr.isEmpty()) { @@ -643,10 +643,10 @@ public class GDBPatternMatchingExpressions extends AbstractDsfService implements final DataRequestMonitor<IExpressionDMContext[]> rm) { // First separate the group into different expressions. // We need to create a new list, as we will modify it during our processing. - final List<String> exprList = new ArrayList<String>(splitExpressionsInGroup(exprGroupDmc)); + final List<String> exprList = new ArrayList<>(splitExpressionsInGroup(exprGroupDmc)); // List to store the final result, which is all the sub-expressions of this group - final ArrayList<IExpressionDMContext> subExprList = new ArrayList<IExpressionDMContext>(); + final ArrayList<IExpressionDMContext> subExprList = new ArrayList<>(); final int startIndex1 = (startIndex < 0) ? 0 : startIndex; final int length1 = (length < 0) ? Integer.MAX_VALUE : length; @@ -662,7 +662,7 @@ public class GDBPatternMatchingExpressions extends AbstractDsfService implements // Not only does selecting the element jump back and forth between the duplicates, // but children of duplicated elements are not always right. Because of this, we // remove all duplicates here. - LinkedHashSet<IExpressionDMContext> uniqueSubExprSet = new LinkedHashSet<IExpressionDMContext>( + LinkedHashSet<IExpressionDMContext> uniqueSubExprSet = new LinkedHashSet<>( subExprList); subExprList.clear(); subExprList.addAll(uniqueSubExprSet); @@ -777,7 +777,7 @@ public class GDBPatternMatchingExpressions extends AbstractDsfService implements @Override protected void handleSuccess() { final List<IExpressionDMContext> exprList = getData() != null ? getData() - : new ArrayList<IExpressions.IExpressionDMContext>(); + : new ArrayList<>(); matchLocals(exprDmc, new ImmediateDataRequestMonitor<List<IExpressionDMContext>>(rm) { @Override protected void handleSuccess() { @@ -815,7 +815,7 @@ public class GDBPatternMatchingExpressions extends AbstractDsfService implements @Override protected void handleSuccess() { assert getData() instanceof MIRegisterDMC[]; - ArrayList<IExpressionDMContext> matches = new ArrayList<IExpressionDMContext>(); + ArrayList<IExpressionDMContext> matches = new ArrayList<>(); String fullExpr = globDmc.getExpression().trim(); if (fullExpr.startsWith(GLOB_EXPRESSION_PREFIX)) { @@ -865,7 +865,7 @@ public class GDBPatternMatchingExpressions extends AbstractDsfService implements final CountingRequestMonitor varNameCRM = new CountingRequestMonitor(getExecutor(), rm) { @Override public void handleSuccess() { - ArrayList<IExpressionDMContext> matches = new ArrayList<IExpressionDMContext>( + ArrayList<IExpressionDMContext> matches = new ArrayList<>( localsDMData.length); String fullExpr = globDmc.getExpression().trim(); @@ -954,7 +954,7 @@ public class GDBPatternMatchingExpressions extends AbstractDsfService implements final CountingRequestMonitor varNameCRM = new CountingRequestMonitor(getExecutor(), rm) { @Override public void handleSuccess() { - final ArrayList<IExpressionDMContext> matches = new ArrayList<IExpressionDMContext>(); + final ArrayList<IExpressionDMContext> matches = new ArrayList<>(); final CountingRequestMonitor elementMatchesCRM = new CountingRequestMonitor(getExecutor(), rm) { @Override public void handleSuccess() { @@ -1025,7 +1025,7 @@ public class GDBPatternMatchingExpressions extends AbstractDsfService implements protected void handleCompleted() { boolean isArray = isSuccess() && getData().getBasicType().equals(IExpressionDMData.BasicType.array); - final ArrayList<IExpressionDMContext> elements = new ArrayList<IExpressionDMContext>(); + final ArrayList<IExpressionDMContext> elements = new ArrayList<>(); if (isArray) { // we must now create the elements based on the indices @@ -1053,7 +1053,7 @@ public class GDBPatternMatchingExpressions extends AbstractDsfService implements * could be a valid expression (i.e., the index 3-2=1 in this case) */ protected List<IExpressionDMContext> createArrayIndicesExpression(IExpressionDMContext arrayDmc, String indexSpec) { - ArrayList<IExpressionDMContext> expressionDMCs = new ArrayList<IExpressionDMContext>(); + ArrayList<IExpressionDMContext> expressionDMCs = new ArrayList<>(); String arrayName = arrayDmc.getExpression(); IDMContext parentDmc = arrayDmc.getParents()[0]; diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses.java index fc70fe604b7..daf39b69c06 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses.java @@ -91,7 +91,7 @@ public class GDBProcesses extends MIProcesses implements IGDBProcesses { // A map of pid to names. It is filled when we get all the // processes that are running - private Map<Integer, String> fProcessNames = new HashMap<Integer, String>(); + private Map<Integer, String> fProcessNames = new HashMap<>(); // Id of our process. Currently, we only know it for an attach session. private String fProcId; @@ -573,7 +573,7 @@ public class GDBProcesses extends MIProcesses implements IGDBProcesses { // the overrideable process factory to allow others to override. // First set attribute to specify we want to create an inferior process. // Bug 210366 - Map<String, String> attributes = new HashMap<String, String>(); + Map<String, String> attributes = new HashMap<>(); attributes.put(IGdbDebugConstants.PROCESS_TYPE_CREATION_ATTR, IGdbDebugConstants.INFERIOR_PROCESS_CREATION_VALUE); IProcess runtimeInferior = DebugPlugin.newProcess(launch, inferior, label, attributes); diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java index 82288507b27..c277dadd323 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_0.java @@ -611,11 +611,11 @@ public class GDBProcesses_7_0 extends AbstractDsfService implements IGDBProcesse /** * A map of thread id to thread group id. We use this to find out to which threadGroup a thread belongs. */ - private Map<String, String> fThreadToGroupMap = new HashMap<String, String>(); + private Map<String, String> fThreadToGroupMap = new HashMap<>(); /** * A map of thread group id to process id. We use this to find out to which pid a group refers. */ - private Map<String, String> fGroupToPidMap = new HashMap<String, String>(); + private Map<String, String> fGroupToPidMap = new HashMap<>(); private IGDBControl fCommandControl; private IGDBBackend fBackend; @@ -969,7 +969,7 @@ public class GDBProcesses_7_0 extends AbstractDsfService implements IGDBProcesse } String groupId = containerDmc.getGroupId(); - List<IMIExecutionDMContext> execDmcList = new ArrayList<IMIExecutionDMContext>(); + List<IMIExecutionDMContext> execDmcList = new ArrayList<>(); Iterator<Map.Entry<String, String>> iterator = getThreadToGroupMap().entrySet().iterator(); while (iterator.hasNext()) { Map.Entry<String, String> entry = iterator.next(); @@ -1553,7 +1553,7 @@ public class GDBProcesses_7_0 extends AbstractDsfService implements IGDBProcesse // -list-thread-groups // ^done,groups=[{id="i1",type="process"}] // Just ignore that entry - List<IMIContainerDMContext> containerDmcs = new ArrayList<IMIContainerDMContext>(groups.length); + List<IMIContainerDMContext> containerDmcs = new ArrayList<>(groups.length); for (IThreadGroupInfo group : groups) { if (group.getPid() == null || group.getPid().isEmpty() || group.getPid().equals("0")) { //$NON-NLS-1$ continue; @@ -1855,7 +1855,7 @@ public class GDBProcesses_7_0 extends AbstractDsfService implements IGDBProcesse // First set attribute to specify we want to create an inferior process. // Bug 210366 ILaunch launch = (ILaunch) getSession().getModelAdapter(ILaunch.class); - Map<String, String> attributes = new HashMap<String, String>(); + Map<String, String> attributes = new HashMap<>(); attributes.put(IGdbDebugConstants.PROCESS_TYPE_CREATION_ATTR, IGdbDebugConstants.INFERIOR_PROCESS_CREATION_VALUE); IProcess runtimeInferior = DebugPlugin.newProcess(launch, inferior, label != null ? label : "", //$NON-NLS-1$ diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java index 0fb2509259b..9269d384465 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBProcesses_7_2.java @@ -186,7 +186,7 @@ public class GDBProcesses_7_2 extends GDBProcesses_7_1 implements IMultiTerminat * We use this set for such things as not removing breakpoints * because we know the process will be restarted. */ - private Set<IContainerDMContext> fProcRestarting = new HashSet<IContainerDMContext>(); + private Set<IContainerDMContext> fProcRestarting = new HashSet<>(); /** * Indicates that we are currently visualizing trace data. @@ -810,7 +810,7 @@ public class GDBProcesses_7_2 extends GDBProcesses_7_1 implements IMultiTerminat * @since 4.6 */ protected void canDetachFromProcesses(IDMContext[] dmcs, boolean all, DataRequestMonitor<Boolean> rm) { - Set<IMIContainerDMContext> contDmcs = new HashSet<IMIContainerDMContext>(); + Set<IMIContainerDMContext> contDmcs = new HashSet<>(); for (IDMContext c : dmcs) { IMIContainerDMContext contDmc = DMContexts.getAncestorOfType(c, IMIContainerDMContext.class); if (contDmc != null) { @@ -832,7 +832,7 @@ public class GDBProcesses_7_2 extends GDBProcesses_7_1 implements IMultiTerminat */ @Override public void detachDebuggerFromProcesses(IDMContext[] dmcs, final RequestMonitor rm) { - Set<IMIContainerDMContext> contDmcs = new HashSet<IMIContainerDMContext>(); + Set<IMIContainerDMContext> contDmcs = new HashSet<>(); for (IDMContext c : dmcs) { IMIContainerDMContext contDmc = DMContexts.getAncestorOfType(c, IMIContainerDMContext.class); if (contDmc != null) { diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRegisters.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRegisters.java index 05e2f1f9536..118749443f9 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRegisters.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRegisters.java @@ -72,20 +72,20 @@ public class GDBRegisters extends MIRegisters implements IRegisters2 { * References to all groups related to a given context. Different programs may use different sets of registers e.g. * 32/64 bits */ - private final ContextToGroupsMap<IContainerDMContext, MIRegisterGroupDMC[]> fContextToGroupsMap = new ContextToGroupsMap<IContainerDMContext, MIRegisterGroupDMC[]>(); + private final ContextToGroupsMap<IContainerDMContext, MIRegisterGroupDMC[]> fContextToGroupsMap = new ContextToGroupsMap<>(); /** * Used to save base list of Registers associated to a group, these registers can not be used as is for * "getRegisters" since the execution context may change e.g. The current selection points to a process or a running * thread or a different frame, all information besides the execution context is valid. */ - private final GroupRegistersMap<MIRegisterGroupDMC, MIRegisterDMC[]> fGroupToRegistersMap = new GroupRegistersMap<MIRegisterGroupDMC, MIRegisterDMC[]>(); + private final GroupRegistersMap<MIRegisterGroupDMC, MIRegisterDMC[]> fGroupToRegistersMap = new GroupRegistersMap<>(); /** * Saves the Group number to RegisterGroupDescriptor created from the serialized memento, The group number is used across contexts as the * key:Integer uses a booking number incremented across container contexts */ - private final Map<Integer, IRegisterGroupDescriptor> fGroupMementoDescriptorIndex = new HashMap<Integer, IRegisterGroupDescriptor>(); + private final Map<Integer, IRegisterGroupDescriptor> fGroupMementoDescriptorIndex = new HashMap<>(); public GDBRegisters(DsfSession session) { super(session); @@ -93,7 +93,7 @@ public class GDBRegisters extends MIRegisters implements IRegisters2 { private class ContextToGroupsMap<K, V> extends HashMap<IContainerDMContext, MIRegisterGroupDMC[]> { private static final long serialVersionUID = 1L; - private final Map<IContainerDMContext, Map<String, MIRegisterGroupDMC>> fNameToGroupMap = new HashMap<IContainerDMContext, Map<String, MIRegisterGroupDMC>>(); + private final Map<IContainerDMContext, Map<String, MIRegisterGroupDMC>> fNameToGroupMap = new HashMap<>(); @Override public MIRegisterGroupDMC[] put(IContainerDMContext key, MIRegisterGroupDMC[] value) { @@ -131,7 +131,7 @@ public class GDBRegisters extends MIRegisters implements IRegisters2 { Map<String, MIRegisterGroupDMC> nameMap = fNameToGroupMap.get(key); if (nameMap == null) { // cache not resolved, rebuild - nameMap = new HashMap<String, MIRegisterGroupDMC>(); + nameMap = new HashMap<>(); MIRegisterGroupDMC[] groupsArr = super.get(key); // If the container context exist, build the name map if (groupsArr != null) { @@ -175,7 +175,7 @@ public class GDBRegisters extends MIRegisters implements IRegisters2 { */ private class GroupRegistersMap<K, V> extends HashMap<MIRegisterGroupDMC, MIRegisterDMC[]> { private static final long serialVersionUID = 1L; - private final Map<MIRegisterGroupDMC, Map<String, MIRegisterDMC>> fNameToRegisterMap = new HashMap<MIRegisterGroupDMC, Map<String, MIRegisterDMC>>(); + private final Map<MIRegisterGroupDMC, Map<String, MIRegisterDMC>> fNameToRegisterMap = new HashMap<>(); @Override public MIRegisterDMC[] put(MIRegisterGroupDMC key, MIRegisterDMC[] value) { @@ -216,7 +216,7 @@ public class GDBRegisters extends MIRegisters implements IRegisters2 { return null; } - Map<String, MIRegisterDMC> registerNameMap = new HashMap<String, MIRegisterDMC>(); + Map<String, MIRegisterDMC> registerNameMap = new HashMap<>(); for (IRegisterDMContext register : registers) { assert (register instanceof MIRegisterDMC); MIRegisterDMC registerDmc = (MIRegisterDMC) register; @@ -761,7 +761,7 @@ public class GDBRegisters extends MIRegisters implements IRegisters2 { * Cast to MI and sort them ascending order by register index */ private MIRegisterDMC[] arrangeRegisters(IRegisterDMContext[] iRegisters) { - TreeMap<Integer, MIRegisterDMC> sortedRegisters = new TreeMap<Integer, MIRegisterDMC>(); + TreeMap<Integer, MIRegisterDMC> sortedRegisters = new TreeMap<>(); for (int i = 0; i < iRegisters.length; i++) { assert (iRegisters[i] instanceof MIRegisterDMC); MIRegisterDMC register = (MIRegisterDMC) iRegisters[i]; @@ -781,7 +781,7 @@ public class GDBRegisters extends MIRegisters implements IRegisters2 { private void removeRegisterGroups(IRegisterGroupDMContext[] groups, boolean removeRoot, RequestMonitor rm) { if (groups != null) { // Save a list of updated containers to only send an update event for each of them - final Set<IContainerDMContext> updatedContainers = new HashSet<IContainerDMContext>(); + final Set<IContainerDMContext> updatedContainers = new HashSet<>(); for (IRegisterGroupDMContext group : groups) { if (!removeRoot) { @@ -808,7 +808,7 @@ public class GDBRegisters extends MIRegisters implements IRegisters2 { assert (groupsCtx != null); if (groupsCtx != null) { - List<MIRegisterGroupDMC> groupsList = new ArrayList<MIRegisterGroupDMC>(Arrays.asList(groupsCtx)); + List<MIRegisterGroupDMC> groupsList = new ArrayList<>(Arrays.asList(groupsCtx)); // Removing a single group groupsList.remove(group); @@ -875,7 +875,7 @@ public class GDBRegisters extends MIRegisters implements IRegisters2 { IRegisterGroupDescriptor[] buildDescriptors() { // use a tree map to sort the entries by group number - TreeMap<Integer, MIRegisterGroupDMC> sortedGroups = new TreeMap<Integer, MIRegisterGroupDMC>(); + TreeMap<Integer, MIRegisterGroupDMC> sortedGroups = new TreeMap<>(); for (MIRegisterGroupDMC group : fGroupToRegistersMap.keySet()) { sortedGroups.put(Integer.valueOf(group.getGroupNo()), group); @@ -923,7 +923,7 @@ public class GDBRegisters extends MIRegisters implements IRegisters2 { return new MIRegisterGroupDMC[0]; } - List<MIRegisterGroupDMC> groups = new ArrayList<MIRegisterGroupDMC>(); + List<MIRegisterGroupDMC> groups = new ArrayList<>(); for (IRegisterGroupDescriptor group : groupDescriptions) { fGroupMementoDescriptorIndex.put(fGroupBookingCount, group); groups.add(new MIRegisterGroupDMC(this, contDmc, fGroupBookingCount, group.getName())); @@ -1001,7 +1001,7 @@ public class GDBRegisters extends MIRegisters implements IRegisters2 { */ private MIRegisterDMC[] resolveRegisters(IRegisterGroupDescriptor grpDescriptor, IDMContext ctx) throws CoreException { - final List<MIRegisterDMC> registerContexts = new ArrayList<MIRegisterDMC>(); + final List<MIRegisterDMC> registerContexts = new ArrayList<>(); final IContainerDMContext containerDmc = DMContexts.getAncestorOfType(ctx, IContainerDMContext.class); final MIRegisterGroupDMC groupDmc = DMContexts.getAncestorOfType(ctx, MIRegisterGroupDMC.class); diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0_NS.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0_NS.java index 51c5dede46e..592b80bb3f4 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0_NS.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/GDBRunControl_7_0_NS.java @@ -383,7 +383,7 @@ public class GDBRunControl_7_0_NS extends AbstractDsfService private boolean fTerminated = false; // ThreadStates indexed by the execution context - protected Map<IMIExecutionDMContext, MIThreadRunState> fThreadRunStates = new HashMap<IMIExecutionDMContext, MIThreadRunState>(); + protected Map<IMIExecutionDMContext, MIThreadRunState> fThreadRunStates = new HashMap<>(); private RunToLineActiveOperation fRunToLineActiveOperation = null; @@ -402,15 +402,15 @@ public class GDBRunControl_7_0_NS extends AbstractDsfService /** * Set of threads for which the next MIRunning event should be silenced. */ - private Set<IMIExecutionDMContext> fDisableNextRunningEventDmcSet = new HashSet<IMIExecutionDMContext>(); + private Set<IMIExecutionDMContext> fDisableNextRunningEventDmcSet = new HashSet<>(); /** * Set of threads for which the next MISignal (MIStopped) event should be silenced. */ - private Set<IMIExecutionDMContext> fDisableNextSignalEventDmcSet = new HashSet<IMIExecutionDMContext>(); + private Set<IMIExecutionDMContext> fDisableNextSignalEventDmcSet = new HashSet<>(); /** * Map that stores the silenced MIStopped event for the specified thread, in case we need to use it for a failure. */ - private Map<IMIExecutionDMContext, MIStoppedEvent> fSilencedSignalEventMap = new HashMap<IMIExecutionDMContext, MIStoppedEvent>(); + private Map<IMIExecutionDMContext, MIStoppedEvent> fSilencedSignalEventMap = new HashMap<>(); /** * This variable allows us to know if run control operation @@ -1266,7 +1266,7 @@ public class GDBRunControl_7_0_NS extends AbstractDsfService }; // The set of threads that we will actually be suspended to make the containers suspended. - private Set<IMIExecutionDMContext> fExecutionDmcToSuspendSet = new HashSet<IMIExecutionDMContext>(); + private Set<IMIExecutionDMContext> fExecutionDmcToSuspendSet = new HashSet<>(); // Do we currently have an executeWithTargetAvailable() operation ongoing? private boolean fOngoingOperation; @@ -1288,7 +1288,7 @@ public class GDBRunControl_7_0_NS extends AbstractDsfService // and we can complete the operation. private int fNumStepsStillExecuting; // Queue of executeWithTargetAvailable() operations that need to be processed. - private LinkedList<TargetAvailableOperationInfo> fOperationsPending = new LinkedList<TargetAvailableOperationInfo>(); + private LinkedList<TargetAvailableOperationInfo> fOperationsPending = new LinkedList<>(); /** * Returns whether there is currently an ExecuteWithTargetAvailable() operation ongoing. @@ -2211,7 +2211,7 @@ public class GDBRunControl_7_0_NS extends AbstractDsfService resumeAtLocation(context, location, rm); } else { // Create the breakpoint attributes - Map<String, Object> attr = new HashMap<String, Object>(); + Map<String, Object> attr = new HashMap<>(); attr.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.BREAKPOINT); attr.put(MIBreakpoints.FILE_NAME, debuggerPath); attr.put(MIBreakpoints.LINE_NUMBER, lineNumber); @@ -2255,7 +2255,7 @@ public class GDBRunControl_7_0_NS extends AbstractDsfService resumeAtLocation(context, location, rm); else { // Create the breakpoint attributes - Map<String, Object> attr = new HashMap<String, Object>(); + Map<String, Object> attr = new HashMap<>(); attr.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.BREAKPOINT); attr.put(MIBreakpoints.ADDRESS, "0x" + address.toString(16)); //$NON-NLS-1$ attr.put(MIBreakpointDMData.IS_TEMPORARY, true); @@ -2592,10 +2592,10 @@ public class GDBRunControl_7_0_NS extends AbstractDsfService */ private List<IExecutionDMContext> extractContextsForOperation(IExecutionDMContext[] contexts) { // Remove duplicate contexts by using a set - Set<IExecutionDMContext> specifiedExedDmcSet = new HashSet<IExecutionDMContext>(Arrays.asList(contexts)); + Set<IExecutionDMContext> specifiedExedDmcSet = new HashSet<>(Arrays.asList(contexts)); // A list that ignores threads for which the process is also present - List<IExecutionDMContext> execDmcForOperationList = new ArrayList<IExecutionDMContext>( + List<IExecutionDMContext> execDmcForOperationList = new ArrayList<>( specifiedExedDmcSet.size()); // Check for the case of a process selected along with some of its threads diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_0.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_0.java index 2fe91716e45..ac18ef3e340 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_0.java @@ -132,7 +132,7 @@ public class StartOrRestartProcessSequence_7_0 extends ReflectionSequence { assert containerDmc != null; if (attributes == null) { // If no attributes are specified, simply use an empty map. - attributes = new HashMap<String, Object>(); + attributes = new HashMap<>(); } fContainerDmc = containerDmc; diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_10.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_10.java index 9e8a4a1ae3c..22bd18b83ba 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_10.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_10.java @@ -57,7 +57,7 @@ public class StartOrRestartProcessSequence_7_10 extends StartOrRestartProcessSeq if (GROUP_TOP_LEVEL.equals(group)) { // Initialize the list with the base class' steps // We need to create a list that we can modify, which is why we create our own ArrayList. - List<String> orderList = new ArrayList<String>(Arrays.asList(super.getExecutionOrder(GROUP_TOP_LEVEL))); + List<String> orderList = new ArrayList<>(Arrays.asList(super.getExecutionOrder(GROUP_TOP_LEVEL))); // Insert the new stepSetReverseMode after stepSetReverseOff orderList.add(orderList.indexOf("stepSetReverseOff") + 1, "stepSetReverseMode"); //$NON-NLS-1$ //$NON-NLS-2$ diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_12.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_12.java index a1288c0385d..d8918a0e575 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_12.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/StartOrRestartProcessSequence_7_12.java @@ -59,7 +59,7 @@ public class StartOrRestartProcessSequence_7_12 extends StartOrRestartProcessSeq if (GROUP_TOP_LEVEL.equals(group)) { // Initialize the list with the base class' steps // We need to create a list that we can modify, which is why we create our own ArrayList. - List<String> orderList = new ArrayList<String>(Arrays.asList(super.getExecutionOrder(GROUP_TOP_LEVEL))); + List<String> orderList = new ArrayList<>(Arrays.asList(super.getExecutionOrder(GROUP_TOP_LEVEL))); // Need to insert reverse mode off before ordering the reverse start at a specified location orderList.add(orderList.indexOf("stepCreateConsole") + 1, "stepSetReverseOff2"); //$NON-NLS-1$ //$NON-NLS-2$ diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java index 11cbc0d9c2b..ca54d11a493 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GDBControl.java @@ -207,7 +207,7 @@ public class GDBControl extends AbstractMIControl implements IGDBControl { * is available in 6.8, it does not report anything we care about, so * return empty list. */ - private final List<String> fFeatures = new ArrayList<String>(); + private final List<String> fFeatures = new ArrayList<>(); private Sequence fInitializationSequence; diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GdbCommandTimeoutManager.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GdbCommandTimeoutManager.java index 7e38a27d6be..087f4d4bc9c 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GdbCommandTimeoutManager.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/service/command/GdbCommandTimeoutManager.java @@ -222,7 +222,7 @@ public class GdbCommandTimeoutManager implements ICommandListener, IPreferenceCh private boolean fTimeoutEnabled = false; private int fTimeout = 0; private TimerThread fTimerThread; - private BlockingQueue<QueueEntry> fCommandQueue = new LinkedBlockingQueue<QueueEntry>(); + private BlockingQueue<QueueEntry> fCommandQueue = new LinkedBlockingQueue<>(); private CustomTimeoutsMap fCustomTimeouts = new CustomTimeoutsMap(); private ListenerList fListeners; diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/CSourceLookup.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/CSourceLookup.java index 169e5de5e14..25638044357 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/CSourceLookup.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/CSourceLookup.java @@ -52,7 +52,7 @@ import org.osgi.framework.BundleContext; * ISourceLookup service implementation based on the CDT CSourceLookupDirector. */ public class CSourceLookup extends AbstractDsfService implements ISourceLookup { - private Map<ISourceLookupDMContext, CSourceLookupDirector> fDirectors = new HashMap<ISourceLookupDMContext, CSourceLookupDirector>(); + private Map<ISourceLookupDMContext, CSourceLookupDirector> fDirectors = new HashMap<>(); ICommandControl fConnection; private CommandFactory fCommandFactory; @@ -79,7 +79,7 @@ public class CSourceLookup extends AbstractDsfService implements ISourceLookup { } private List<String> getSourceLookupPath(ISourceContainer[] containers) { - ArrayList<String> list = new ArrayList<String>(containers.length); + ArrayList<String> list = new ArrayList<>(containers.length); for (ISourceContainer container : containers) { if (container instanceof CProjectSourceContainer) { diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointDMData.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointDMData.java index a00c3cd5685..76c884b68cf 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointDMData.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointDMData.java @@ -71,7 +71,7 @@ public class MIBreakpointDMData implements IBreakpointDMData { public MIBreakpointDMData(MIBreakpointDMData other) { fBreakpoint = new MIBreakpoint(other.fBreakpoint); - fProperties = new HashMap<String, Object>(other.fProperties); + fProperties = new HashMap<>(other.fProperties); } /** @@ -81,7 +81,7 @@ public class MIBreakpointDMData implements IBreakpointDMData { * @since 5.3 */ public MIBreakpointDMData copy() { - return new MIBreakpointDMData(new MIBreakpoint(fBreakpoint), new HashMap<String, Object>(fProperties)); + return new MIBreakpointDMData(new MIBreakpoint(fBreakpoint), new HashMap<>(fProperties)); } /** @@ -98,7 +98,7 @@ public class MIBreakpointDMData implements IBreakpointDMData { if (properties != null) { fProperties = properties; } else { - fProperties = new HashMap<String, Object>(); + fProperties = new HashMap<>(); if (dsfMIBreakpoint.isTracepoint()) { // Generic breakpoint attributes diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpoints.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpoints.java index ee834d1a4c9..13aa31b9c37 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpoints.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpoints.java @@ -595,7 +595,7 @@ public class MIBreakpoints extends AbstractDsfService public void getExecutionContextBreakpoints(IExecutionDMContext ctx, DataRequestMonitor<IBreakpointDMContext[]> rm) { IBreakpointDMContext[] bps = fBreakpointHitMap.get(ctx); if (bps == null && ctx instanceof IContainerDMContext) { - List<IBreakpointDMContext> bpsList = new ArrayList<IBreakpointDMContext>(1); + List<IBreakpointDMContext> bpsList = new ArrayList<>(1); for (Map.Entry<IExecutionDMContext, IBreakpointDMContext[]> entry : fBreakpointHitMap.entrySet()) { if (DMContexts.isAncestorOf(entry.getKey(), ctx)) { @@ -748,7 +748,7 @@ public class MIBreakpoints extends AbstractDsfService // By default the breakpoint is enabled at creation // If it wasn't supposed to be, then disable it right away - Map<String, Object> delta = new HashMap<String, Object>(); + Map<String, Object> delta = new HashMap<>(); delta.put(IS_ENABLED, getProperty(attributes, IS_ENABLED, true)); modifyBreakpoint(dmc, delta, rm, false); } @@ -844,7 +844,7 @@ public class MIBreakpoints extends AbstractDsfService // Condition, ignore count and state can not be specified at watchpoint creation time. // Therefore, we have to update the watchpoint if any of these is present - Map<String, Object> delta = new HashMap<String, Object>(); + Map<String, Object> delta = new HashMap<>(); delta.put(CONDITION, getProperty(attributes, CONDITION, NULL_STRING)); delta.put(IGNORE_COUNT, getProperty(attributes, IGNORE_COUNT, 0)); delta.put(IS_ENABLED, getProperty(attributes, IS_ENABLED, true)); @@ -941,7 +941,7 @@ public class MIBreakpoints extends AbstractDsfService // Condition, ignore count and state cannot be specified at creation time. // Therefore, we have to update the catchpoint if any of these is present - Map<String, Object> delta = new HashMap<String, Object>(); + Map<String, Object> delta = new HashMap<>(); delta.put(CONDITION, getProperty(attributes, CONDITION, NULL_STRING)); delta.put(IGNORE_COUNT, getProperty(attributes, IGNORE_COUNT, 0)); delta.put(IS_ENABLED, getProperty(attributes, IS_ENABLED, true)); @@ -1109,7 +1109,7 @@ public class MIBreakpoints extends AbstractDsfService protected void modifyBreakpoint(final IBreakpointDMContext dmc, Map<String, Object> attributes, final RequestMonitor rm, final boolean generateUpdateEvent) { // Use a working copy of the attributes since we are going to tamper happily with them - Map<String, Object> properties = new HashMap<String, Object>(attributes); + Map<String, Object> properties = new HashMap<>(attributes); // Retrieve the breakpoint parameters // At this point, we know their are OK so there is no need to re-validate diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointsManager.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointsManager.java index 2e613488674..e66a5adb7ae 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointsManager.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointsManager.java @@ -1958,7 +1958,7 @@ public class MIBreakpointsManager extends AbstractDsfService */ protected Map<String, Object> convertToPlatformAttributes(Map<String, Object> cdtAttributes) { - Map<String, Object> result = new HashMap<String, Object>(); + Map<String, Object> result = new HashMap<>(); // IBreakpoint attributes if (cdtAttributes.containsKey(ATTR_DEBUGGER_PATH)) { @@ -2311,8 +2311,8 @@ public class MIBreakpointsManager extends AbstractDsfService } private String[] compareAttributes(Map<String, Object> oldAttr, Map<String, Object> newAttr, String[] exclude) { - List<String> list = new ArrayList<String>(); - Set<String> names = new HashSet<String>(oldAttr.keySet()); + List<String> list = new ArrayList<>(); + Set<String> names = new HashSet<>(oldAttr.keySet()); names.addAll(newAttr.keySet()); for (String n : names) { if (exclude != null && Arrays.asList(exclude).contains(n)) { diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointsSynchronizer.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointsSynchronizer.java index 9a5d7e7269e..53a2b470ce9 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointsSynchronizer.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIBreakpointsSynchronizer.java @@ -186,10 +186,10 @@ public class MIBreakpointsSynchronizer extends AbstractDsfService public MIBreakpointsSynchronizer(DsfSession session) { super(session); - fTrackedTargets = new HashSet<IBreakpointsTargetDMContext>(); - fCreatedTargetBreakpoints = new HashMap<IBreakpointsTargetDMContext, Map<String, MIBreakpoint>>(); - fDeletedTargetBreakpoints = new HashMap<IBreakpointsTargetDMContext, Set<String>>(); - fPendingModifications = new HashMap<IBreakpointsTargetDMContext, Map<String, MIBreakpoint>>(); + fTrackedTargets = new HashSet<>(); + fCreatedTargetBreakpoints = new HashMap<>(); + fDeletedTargetBreakpoints = new HashMap<>(); + fPendingModifications = new HashMap<>(); } @Override @@ -451,7 +451,7 @@ public class MIBreakpointsSynchronizer extends AbstractDsfService // when addBreakpoint() is called. Map<String, MIBreakpoint> targetMap = fCreatedTargetBreakpoints.get(bpTargetDMC); if (targetMap == null) { - targetMap = new HashMap<String, MIBreakpoint>(); + targetMap = new HashMap<>(); fCreatedTargetBreakpoints.put(bpTargetDMC, targetMap); } targetMap.put(miBpt.getNumber(), miBpt); @@ -594,7 +594,7 @@ public class MIBreakpointsSynchronizer extends AbstractDsfService if (plBpt instanceof ICBreakpoint) { Set<String> set = fDeletedTargetBreakpoints.get(bpTargetDMC); if (set == null) { - set = new HashSet<String>(); + set = new HashSet<>(); fDeletedTargetBreakpoints.put(bpTargetDMC, set); } set.add(id); @@ -619,7 +619,7 @@ public class MIBreakpointsSynchronizer extends AbstractDsfService } IExecutionDMContext[] execDMCs = bpExtension.getThreadFilters(contDMC); - List<IExecutionDMContext> list = new ArrayList<IExecutionDMContext>(execDMCs.length); + List<IExecutionDMContext> list = new ArrayList<>(execDMCs.length); for (IExecutionDMContext c : execDMCs) { if (c instanceof IMIExecutionDMContext && !((IMIExecutionDMContext) c).getThreadId().equals(threadId)) { @@ -724,7 +724,7 @@ public class MIBreakpointsSynchronizer extends AbstractDsfService // modification data, it will be picked up later. Map<String, MIBreakpoint> map = fPendingModifications.get(bpTargetDMC); if (map == null) { - map = new HashMap<String, MIBreakpoint>(); + map = new HashMap<>(); fPendingModifications.put(bpTargetDMC, map); } map.put(miBpt.getNumber(), miBpt); @@ -1437,7 +1437,7 @@ public class MIBreakpointsSynchronizer extends AbstractDsfService * @param commands list of gdb tracepoint commands separated by TracepointActionManager.TRACEPOINT_ACTION_DELIMITER */ private ITracepointAction[] getActionsFromCommands(String[] commands) { - List<ITracepointAction> list = new ArrayList<ITracepointAction>(); + List<ITracepointAction> list = new ArrayList<>(); TracepointActionManager tam = TracepointActionManager.getInstance(); WhileSteppingAction whileStepping = null; List<ITracepointAction> subActions = null; @@ -1465,7 +1465,7 @@ public class MIBreakpointsSynchronizer extends AbstractDsfService } else if (command.startsWith(TC_WHILE_STEPPING)) { whileStepping = createWhileSteppingAction(command.substring(TC_WHILE_STEPPING.length())); if (whileStepping != null) { - subActions = new ArrayList<ITracepointAction>(); + subActions = new ArrayList<>(); } } else if (command.equals(TC_END)) { if (whileStepping == null || subActions == null) { diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIExpressions.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIExpressions.java index 1a636b2ae70..ec715092b54 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIExpressions.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIExpressions.java @@ -741,7 +741,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions, @Override public Map<String, Integer> getEnumerations() { - return new HashMap<String, Integer>(); + return new HashMap<>(); } @Override @@ -859,20 +859,20 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions, * storing the return value, e.g., $1 -> "foo() returned" * This map allows to quickly find the alias to be used for return value variables. */ - private Map<String, String> fExpressionAliasesMap = new HashMap<String, String>(); + private Map<String, String> fExpressionAliasesMap = new HashMap<>(); /** * Map of thread to aliases expression list. This map allows to know which aliases are related * to a thread of execution. This is important to allow us to delete aliases when a * thread exits. Note that we need a list because we keep all previous aliases until * the thread exits. */ - private Map<IMIExecutionDMContext, List<String>> fThreadToAliasedExpressionsMap = new HashMap<IMIExecutionDMContext, List<String>>(); + private Map<IMIExecutionDMContext, List<String>> fThreadToAliasedExpressionsMap = new HashMap<>(); /** * Map of thread to the name of the method the thread last stopped in. * This allows us to create the alias based on the method the thread was in * before it returned out of the method. */ - private Map<IMIExecutionDMContext, String> fThreadToTopMethodName = new HashMap<IMIExecutionDMContext, String>(); + private Map<IMIExecutionDMContext, String> fThreadToTopMethodName = new HashMap<>(); /** * Create an alias for expr with respect to threadDmc. @@ -889,7 +889,7 @@ public class MIExpressions extends AbstractDsfService implements IMIExpressions, List<String> aliasedExprList = fThreadToAliasedExpressionsMap.get(threadDmc); if (aliasedExprList == null) { - aliasedExprList = new ArrayList<String>(); + aliasedExprList = new ArrayList<>(); fThreadToAliasedExpressionsMap.put(threadDmc, aliasedExprList); } aliasedExprList.add(expr); diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIMemory.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIMemory.java index 52f90903777..a6b615577f3 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIMemory.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIMemory.java @@ -157,7 +157,7 @@ public class MIMemory extends AbstractDsfService implements IMemory, ICachingSer register(new String[] { MIMemory.class.getName(), IMemory.class.getName() }, new Hashtable<String, String>()); - fMemoryCaches = new HashMap<IMemoryDMContext, MIMemoryCache>(); + fMemoryCaches = new HashMap<>(); getSession().addServiceEventListener(this, null); @@ -722,7 +722,7 @@ public class MIMemory extends AbstractDsfService implements IMemory, ICachingSer private List<MemoryBlock> getListOfMissingBlocks(IAddress reqBlockStart, int wordCount, int wordSize) { int octetCount = wordCount * wordSize; - LinkedList<MemoryBlock> list = new LinkedList<MemoryBlock>(); + LinkedList<MemoryBlock> list = new LinkedList<>(); ListIterator<MemoryBlock> it = fMemoryBlockList.listIterator(); // Look for holes in the list of memory blocks diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRegisters.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRegisters.java index ea906867ac7..1ff3a3851a5 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRegisters.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRegisters.java @@ -251,7 +251,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach private CommandFactory fCommandFactory; //One Group per container process - private final Map<IContainerDMContext, MIRegisterGroupDMC> fContainerToGroupMap = new HashMap<IContainerDMContext, MIRegisterGroupDMC>(); + private final Map<IContainerDMContext, MIRegisterGroupDMC> fContainerToGroupMap = new HashMap<>(); private CommandCache fRegisterNameCache; // Cache for holding the Register Names in the single Group private CommandCache fRegisterValueCache; // Cache for holding the Register Values @@ -559,7 +559,7 @@ public class MIRegisters extends AbstractDsfService implements IRegisters, ICach // Wraps a list of registers in DMContexts. private MIRegisterDMC[] makeRegisterDMCs(MIRegisterGroupDMC groupDmc, IFrameDMContext frameDmc, String[] regNames) { - List<MIRegisterDMC> regDmcList = new ArrayList<MIRegisters.MIRegisterDMC>(regNames.length); + List<MIRegisterDMC> regDmcList = new ArrayList<>(regNames.length); int regNo = 0; for (String regName : regNames) { if (regName != null && !regName.isEmpty()) { diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java index 00b89388e19..b76cb26d717 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIRunControl.java @@ -1075,7 +1075,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I // and we can complete the operation. private int fNumStepsStillExecuting; // Queue of executeWithTargetAvailable() operations that need to be processed. - private LinkedList<TargetAvailableOperationInfo> fOperationsPending = new LinkedList<TargetAvailableOperationInfo>(); + private LinkedList<TargetAvailableOperationInfo> fOperationsPending = new LinkedList<>(); /** * Returns whether the target is available to perform operations @@ -1587,7 +1587,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I resumeAtLocation(context, location, rm); } else { // Create the breakpoint attributes - Map<String, Object> attr = new HashMap<String, Object>(); + Map<String, Object> attr = new HashMap<>(); attr.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.BREAKPOINT); attr.put(MIBreakpoints.FILE_NAME, debuggerPath); attr.put(MIBreakpoints.LINE_NUMBER, lineNumber); @@ -1633,7 +1633,7 @@ public class MIRunControl extends AbstractDsfService implements IMIRunControl, I resumeAtLocation(context, location, rm); else { // Create the breakpoint attributes - Map<String, Object> attr = new HashMap<String, Object>(); + Map<String, Object> attr = new HashMap<>(); attr.put(MIBreakpoints.BREAKPOINT_TYPE, MIBreakpoints.BREAKPOINT); attr.put(MIBreakpoints.ADDRESS, "0x" + address.toString(16)); //$NON-NLS-1$ attr.put(MIBreakpointDMData.IS_TEMPORARY, true); diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIStack.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIStack.java index e27079fe6af..e57157c0d8b 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIStack.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIStack.java @@ -195,7 +195,7 @@ public class MIStack extends AbstractDsfService implements IStack, ICachingServi private boolean limited = true; // The actual depth we received private int stackDepth = -1; - private final List<FrameData> frames = new ArrayList<FrameData>(); + private final List<FrameData> frames = new ArrayList<>(); /** * Return currently cached stack depth if cache value if valid, otherwise return -1. @@ -349,7 +349,7 @@ public class MIStack extends AbstractDsfService implements IStack, ICachingServi * A return value is stored when the user performs a step-return, * and it cleared as soon as that thread executes again. */ - private Map<IMIExecutionDMContext, VariableData> fThreadToReturnVariable = new HashMap<IMIExecutionDMContext, VariableData>(); + private Map<IMIExecutionDMContext, VariableData> fThreadToReturnVariable = new HashMap<>(); public MIStack(DsfSession session) { super(session); @@ -949,7 +949,7 @@ public class MIStack extends AbstractDsfService implements IStack, ICachingServi // We don't currently support variables with the same name in the same frame, // so we only keep the first one. // Bug 327621 and 328573 - Map<String, MIVariableDMC> variableNames = new LinkedHashMap<String, MIVariableDMC>(); + Map<String, MIVariableDMC> variableNames = new LinkedHashMap<>(); for (int i = 0; i < miArgs.length; i++) { String name = miArgs[i].getName(); @@ -984,7 +984,7 @@ public class MIStack extends AbstractDsfService implements IStack, ICachingServi @Override public void getLocals(final IFrameDMContext frameDmc, final DataRequestMonitor<IVariableDMContext[]> rm) { - final List<IVariableDMContext> localsList = new ArrayList<IVariableDMContext>(); + final List<IVariableDMContext> localsList = new ArrayList<>(); final CountingRequestMonitor countingRm = new CountingRequestMonitor(getExecutor(), rm) { @Override diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIVariableManager.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIVariableManager.java index cc5f756b122..2f481d962cc 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIVariableManager.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/MIVariableManager.java @@ -2179,7 +2179,7 @@ public class MIVariableManager implements ICommandControl { public MIRootVariableObject(VariableObjectId id) { super(id, null); currentState = STATE_NOT_CREATED; - modifiableDescendants = new HashMap<String, MIVariableObject>(); + modifiableDescendants = new HashMap<>(); } public ICommandControlDMContext getControlDMContext() { @@ -2634,13 +2634,13 @@ public class MIVariableManager implements ICommandControl { private IExpressions fExpressionService; // Typically, there will only be one listener, since only the ExpressionService will use this class - private final List<ICommandListener> fCommandProcessors = new ArrayList<ICommandListener>(); + private final List<ICommandListener> fCommandProcessors = new ArrayList<>(); /** Our least recently used cache */ private final LRUVariableCache lruVariableList; /** The list of root variable objects that have been updated */ - private final LinkedList<MIRootVariableObject> updatedRootList = new LinkedList<MIRootVariableObject>(); + private final LinkedList<MIRootVariableObject> updatedRootList = new LinkedList<>(); /** * MIVariableManager constructor diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/AbstractMIControl.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/AbstractMIControl.java index 2a40598826e..e8077abde6b 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/AbstractMIControl.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/AbstractMIControl.java @@ -104,7 +104,7 @@ public abstract class AbstractMIControl extends AbstractDsfService implements IM // Since GDB.7.1 private boolean fUseThreadGroupOption; - private final BlockingQueue<CommandHandle> fTxCommands = new LinkedBlockingQueue<CommandHandle>(); + private final BlockingQueue<CommandHandle> fTxCommands = new LinkedBlockingQueue<>(); private final Map<Integer, CommandHandle> fRxCommands = Collections .synchronizedMap(new HashMap<Integer, CommandHandle>()); @@ -119,14 +119,14 @@ public abstract class AbstractMIControl extends AbstractDsfService implements IM * what the control object is doing. */ - private final List<ICommandListener> fCommandProcessors = new ArrayList<ICommandListener>(); - private final List<IEventListener> fEventProcessors = new ArrayList<IEventListener>(); + private final List<ICommandListener> fCommandProcessors = new ArrayList<>(); + private final List<IEventListener> fEventProcessors = new ArrayList<>(); /** * Current command which have not been handed off to the backend yet. */ - private final List<CommandHandle> fCommandQueue = new ArrayList<CommandHandle>(); + private final List<CommandHandle> fCommandQueue = new ArrayList<>(); /** * Flag indicating that the command control has stopped processing commands. @@ -294,7 +294,7 @@ public abstract class AbstractMIControl extends AbstractDsfService implements IM /* * Now handle any requests which have not been transmitted, but weconsider them handed off. */ - List<CommandHandle> txCommands = new ArrayList<CommandHandle>(); + List<CommandHandle> txCommands = new ArrayList<>(); fTxCommands.drainTo(txCommands); for (CommandHandle commandHandle : txCommands) { if (commandHandle.getRequestMonitor() == null) @@ -748,7 +748,7 @@ public abstract class AbstractMIControl extends AbstractDsfService implements IM * List of out of band records since the last result record. Out of band * records are required for processing the results of CLI commands. */ - private final List<MIOOBRecord> fAccumulatedOOBRecords = new LinkedList<MIOOBRecord>(); + private final List<MIOOBRecord> fAccumulatedOOBRecords = new LinkedList<>(); /** * List of stream records since the last result record, not including @@ -756,7 +756,7 @@ public abstract class AbstractMIControl extends AbstractDsfService implements IM * a subset of {@link #fAccumulatedOOBRecords}, as a stream record is a * particular type of OOB record. */ - private final List<MIStreamRecord> fAccumulatedStreamRecords = new LinkedList<MIStreamRecord>(); + private final List<MIStreamRecord> fAccumulatedStreamRecords = new LinkedList<>(); public RxThread(InputStream inputStream) { super("MI RX Thread"); //$NON-NLS-1$ diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/CommandFactory.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/CommandFactory.java index e700ff075ac..a1aef544584 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/CommandFactory.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/CommandFactory.java @@ -500,21 +500,21 @@ public class CommandFactory { public ICommand<MIDataEvaluateExpressionInfo> createMIDataEvaluateExpression(ICommandControlDMContext ctx, String expr) { - return new MIDataEvaluateExpression<MIDataEvaluateExpressionInfo>(ctx, expr); + return new MIDataEvaluateExpression<>(ctx, expr); } public ICommand<MIDataEvaluateExpressionInfo> createMIDataEvaluateExpression(IMIExecutionDMContext execDmc, String expr) { - return new MIDataEvaluateExpression<MIDataEvaluateExpressionInfo>(execDmc, expr); + return new MIDataEvaluateExpression<>(execDmc, expr); } public ICommand<MIDataEvaluateExpressionInfo> createMIDataEvaluateExpression(IFrameDMContext frameDmc, String expr) { - return new MIDataEvaluateExpression<MIDataEvaluateExpressionInfo>(frameDmc, expr); + return new MIDataEvaluateExpression<>(frameDmc, expr); } public ICommand<MIDataEvaluateExpressionInfo> createMIDataEvaluateExpression(IExpressionDMContext exprDmc) { - return new MIDataEvaluateExpression<MIDataEvaluateExpressionInfo>(exprDmc); + return new MIDataEvaluateExpression<>(exprDmc); } public ICommand<MIDataListRegisterNamesInfo> createMIDataListRegisterNames(IContainerDMContext ctx) { @@ -931,11 +931,11 @@ public class CommandFactory { } public ICommand<MIInfo> createMIInterpreterExec(IDMContext ctx, String interpreter, String cmd) { - return new MIInterpreterExec<MIInfo>(ctx, interpreter, cmd); + return new MIInterpreterExec<>(ctx, interpreter, cmd); } public ICommand<MIInfo> createMIInterpreterExecConsole(IDMContext ctx, String cmd) { - return new MIInterpreterExecConsole<MIInfo>(ctx, cmd); + return new MIInterpreterExecConsole<>(ctx, cmd); } /** @since 4.0 */ diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIBackendCLIProcess.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIBackendCLIProcess.java index c9ed9f08796..b896dd5ce7e 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIBackendCLIProcess.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIBackendCLIProcess.java @@ -66,7 +66,7 @@ public class MIBackendCLIProcess extends AbstractCLIProcess { } public class BackedExitedEventListener { - private final List<RequestMonitor> fWaitForRMs = new ArrayList<RequestMonitor>(); + private final List<RequestMonitor> fWaitForRMs = new ArrayList<>(); @DsfServiceEventHandler public void eventDispatched(BackendStateChangedEvent event) { diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIRunControlEventProcessor.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIRunControlEventProcessor.java index a2ce531140e..8665bd15401 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIRunControlEventProcessor.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIRunControlEventProcessor.java @@ -121,7 +121,7 @@ public class MIRunControlEventProcessor implements IEventProcessor { @Override public void eventReceived(Object output) { for (MIOOBRecord oobr : ((MIOutput) output).getMIOOBRecords()) { - List<MIEvent<?>> events = new LinkedList<MIEvent<?>>(); + List<MIEvent<?>> events = new LinkedList<>(); if (oobr instanceof MIExecAsyncOutput) { MIExecAsyncOutput exec = (MIExecAsyncOutput) oobr; // Change of state. diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIRunControlEventProcessor_7_0.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIRunControlEventProcessor_7_0.java index 3726a94c4d2..5c598ca948e 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIRunControlEventProcessor_7_0.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/MIRunControlEventProcessor_7_0.java @@ -123,7 +123,7 @@ public class MIRunControlEventProcessor_7_0 implements IEventProcessor { @Override public void eventReceived(Object output) { for (MIOOBRecord oobr : ((MIOutput) output).getMIOOBRecords()) { - List<MIEvent<?>> events = new LinkedList<MIEvent<?>>(); + List<MIEvent<?>> events = new LinkedList<>(); if (oobr instanceof MIExecAsyncOutput) { MIExecAsyncOutput exec = (MIExecAsyncOutput) oobr; // Change of state. diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDPrintfInsert.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDPrintfInsert.java index 78305277abc..1320c12f6ad 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDPrintfInsert.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIDPrintfInsert.java @@ -131,7 +131,7 @@ public class MIDPrintfInsert extends MICommand<MIBreakInsertInfo> { } private Adjustable[] createParameters(String location, String printfStr) { - List<Adjustable> paramsList = new ArrayList<Adjustable>(); + List<Adjustable> paramsList = new ArrayList<>(); paramsList.add(new MIStandardParameterAdjustable(location)); diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetArgs.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetArgs.java index 7c4497eb694..25d4b8192d0 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetArgs.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIGDBSetArgs.java @@ -37,7 +37,7 @@ public class MIGDBSetArgs extends MIGDBSet { /** @since 4.0 */ public MIGDBSetArgs(IMIContainerDMContext dmc, String[] arguments) { super(dmc, null); - fParameters = new ArrayList<Adjustable>(); + fParameters = new ArrayList<>(); fParameters.add(new MIStandardParameterAdjustable("args")); //$NON-NLS-1$ /* * GDB-MI terminates the -gdb-set on the newline, so we have to encode diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIListThreadGroups.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIListThreadGroups.java index cb849383243..9275c0af2f9 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIListThreadGroups.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/commands/MIListThreadGroups.java @@ -110,7 +110,7 @@ public class MIListThreadGroups extends MICommand<MIListThreadGroupsInfo> { assert !((groupId != null) && listAll); // see comment above - final ArrayList<String> arguments = new ArrayList<String>(); + final ArrayList<String> arguments = new ArrayList<>(); if (listAll) { arguments.add("--available"); //$NON-NLS-1$ } diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIInfoBreakInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIInfoBreakInfo.java index 5ee62d2db72..6194a89e568 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIInfoBreakInfo.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIInfoBreakInfo.java @@ -56,7 +56,7 @@ import java.util.Set; */ public class CLIInfoBreakInfo extends MIInfo { - private Map<String, String[]> fBreakpointToGroupMap = new HashMap<String, String[]>(); + private Map<String, String[]> fBreakpointToGroupMap = new HashMap<>(); public CLIInfoBreakInfo(MIOutput out) { super(out); @@ -86,7 +86,7 @@ public class CLIInfoBreakInfo extends MIInfo { String bpIdStr = line.split("[\\s\\.]", 2)[0]; //$NON-NLS-1$ String[] groups = fBreakpointToGroupMap.get(bpIdStr); - Set<String> groupIdList = new HashSet<String>(); + Set<String> groupIdList = new HashSet<>(); if (groups != null) { // Since we already know about this breakpoint id we must retain the list // we have been building diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIInfoSharedLibraryInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIInfoSharedLibraryInfo.java index dbdfd5abcd0..4cde03fe9ee 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIInfoSharedLibraryInfo.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIInfoSharedLibraryInfo.java @@ -71,7 +71,7 @@ public class CLIInfoSharedLibraryInfo extends MIInfo { } void parse() { - List<DsfMISharedInfo> aList = new ArrayList<DsfMISharedInfo>(); + List<DsfMISharedInfo> aList = new ArrayList<>(); if (isDone()) { MIOutput out = getMIOutput(); MIOOBRecord[] oobs = out.getMIOOBRecords(); diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIInfoThreadsInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIInfoThreadsInfo.java index 543ad3ca2b9..31db26571ad 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIInfoThreadsInfo.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/CLIInfoThreadsInfo.java @@ -104,7 +104,7 @@ public class CLIInfoThreadsInfo extends MIInfo { } protected void parse() { - info = new ArrayList<ThreadInfo>(); + info = new ArrayList<>(); if (isDone()) { MIOutput out = getMIOutput(); MIOOBRecord[] oobs = out.getMIOOBRecords(); diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIArg.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIArg.java index 0899b1cd329..2daf16e88a6 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIArg.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIArg.java @@ -45,7 +45,7 @@ public class MIArg { * [{name="xxx"},{name="xxx"}] */ public static MIArg[] getMIArgs(MIList miList) { - List<MIArg> aList = new ArrayList<MIArg>(); + List<MIArg> aList = new ArrayList<>(); MIValue[] values = miList.getMIValues(); for (int i = 0; i < values.length; i++) { if (values[i] instanceof MITuple) { @@ -73,7 +73,7 @@ public class MIArg { * {{name="xxx"},{name="xxx"}} */ public static MIArg[] getMIArgs(MITuple miTuple) { - List<MIArg> aList = new ArrayList<MIArg>(); + List<MIArg> aList = new ArrayList<>(); MIValue[] values = miTuple.getMIValues(); for (int i = 0; i < values.length; i++) { if (values[i] instanceof MITuple) { diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIBreakInsertInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIBreakInsertInfo.java index 94bd7103a9b..3b26e72b5df 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIBreakInsertInfo.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIBreakInsertInfo.java @@ -35,7 +35,7 @@ public class MIBreakInsertInfo extends MIInfo { public MIBreakInsertInfo(MIOutput record) { super(record); breakpoints = null; - List<MIBreakpoint> aList = new ArrayList<MIBreakpoint>(1); + List<MIBreakpoint> aList = new ArrayList<>(1); if (isDone()) { MIResultRecord rr = record.getMIResultRecord(); if (rr != null) { diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIBreakListInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIBreakListInfo.java index 6052cda1d15..ff02b7742a2 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIBreakListInfo.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIBreakListInfo.java @@ -41,7 +41,7 @@ public class MIBreakListInfo extends MIInfo { } void parse() { - List<MIBreakpoint> aList = new ArrayList<MIBreakpoint>(1); + List<MIBreakpoint> aList = new ArrayList<>(1); if (isDone()) { MIOutput out = getMIOutput(); MIResultRecord rr = out.getMIResultRecord(); diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIBreakpoint.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIBreakpoint.java index 17c10c95475..1b224b946b3 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIBreakpoint.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIBreakpoint.java @@ -657,7 +657,7 @@ public class MIBreakpoint { } private void parseGroups(MIList list) { - List<String> groups = new ArrayList<String>(); + List<String> groups = new ArrayList<>(); MIValue[] values = list.getMIValues(); for (int i = 0; i < values.length; i++) { diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataDisassembleInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataDisassembleInfo.java index 0aab7da1ea8..7a3a8b9f754 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataDisassembleInfo.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataDisassembleInfo.java @@ -79,8 +79,8 @@ public class MIDataDisassembleInfo extends MIInfo { * parse its value. */ private void parse() { - List<MIInstruction> asmList = new ArrayList<MIInstruction>(); - List<MIMixedInstruction> srcList = new ArrayList<MIMixedInstruction>(); + List<MIInstruction> asmList = new ArrayList<>(); + List<MIMixedInstruction> srcList = new ArrayList<>(); if (isDone()) { MIOutput out = getMIOutput(); diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataListRegisterNamesInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataListRegisterNamesInfo.java index 713a15ffe01..5efc567be15 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataListRegisterNamesInfo.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataListRegisterNamesInfo.java @@ -29,7 +29,7 @@ public class MIDataListRegisterNamesInfo extends MIInfo { public MIDataListRegisterNamesInfo(MIOutput rr) { super(rr); names = null; - List<String> aList = new ArrayList<String>(); + List<String> aList = new ArrayList<>(); if (isDone()) { MIOutput out = getMIOutput(); MIResultRecord outr = out.getMIResultRecord(); diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataListRegisterValuesInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataListRegisterValuesInfo.java index 1c25c653efb..ca99b8b0cd4 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataListRegisterValuesInfo.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIDataListRegisterValuesInfo.java @@ -76,7 +76,7 @@ public class MIDataListRegisterValuesInfo extends MIInfo { public <V extends ICommandResult> V getSubsetResult(ICommand<V> cmd) { if (cmd instanceof MIDataListRegisterValues) { MIDataListRegisterValues command = (MIDataListRegisterValues) cmd; - List<MIRegisterValue> aList = new ArrayList<MIRegisterValue>(); + List<MIRegisterValue> aList = new ArrayList<>(); int[] wantedRegNos = command.getRegList(); /* diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIInfoOsInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIInfoOsInfo.java index a71ddde4f88..00903d184bb 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIInfoOsInfo.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIInfoOsInfo.java @@ -101,7 +101,7 @@ public class MIInfoOsInfo extends MIInfo { } private void parseResourceClasses() { - List<IResourceClass> classes = new ArrayList<IResourceClass>(); + List<IResourceClass> classes = new ArrayList<>(); MITuple table = (MITuple) get(getMIOutput(), "OSDataTable"); //$NON-NLS-1$ diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIListFeaturesInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIListFeaturesInfo.java index 9bfcb387441..0205a621957 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIListFeaturesInfo.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIListFeaturesInfo.java @@ -25,7 +25,7 @@ import java.util.List; */ public class MIListFeaturesInfo extends MIInfo { - private List<String> fFeatures = new ArrayList<String>(); + private List<String> fFeatures = new ArrayList<>(); public MIListFeaturesInfo(MIOutput out) { super(out); diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIListThreadGroupsInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIListThreadGroupsInfo.java index 7309ec5f2cc..7e8bbf5759d 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIListThreadGroupsInfo.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIListThreadGroupsInfo.java @@ -501,7 +501,7 @@ public class MIListThreadGroupsInfo extends MIInfo { /** @since 4.4 */ protected String[] parseCores(MIList list) { - List<String> cores = new ArrayList<String>(); + List<String> cores = new ArrayList<>(); MIValue[] values = list.getMIValues(); for (int i = 0; i < values.length; i++) { diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIMixedInstruction.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIMixedInstruction.java index 5f57239776c..883e38eb216 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIMixedInstruction.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIMixedInstruction.java @@ -62,7 +62,7 @@ public class MIMixedInstruction implements IMixedInstruction { * ] */ private void parse(MITuple tuple) { - List<MIInstruction> instructions = new ArrayList<MIInstruction>(); + List<MIInstruction> instructions = new ArrayList<>(); MIResult[] results = tuple.getMIResults(); for (int i = 0; i < results.length; i++) { String var = results[i].getVariable(); diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIParser.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIParser.java index 7e0b3c5b48e..b4ba93be734 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIParser.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIParser.java @@ -266,7 +266,7 @@ public class MIParser { * Extract the MI Result comma seperated responses. */ private MIResult[] processMIResults(FSB buffer) { - List<MIResult> aList = new ArrayList<MIResult>(); + List<MIResult> aList = new ArrayList<>(); MIResult result = processMIResult(buffer); if (result != null) { aList.add(result); @@ -340,8 +340,8 @@ public class MIParser { */ private MIValue processMITuple(FSB buffer) { MITuple tuple = new MITuple(); - List<MIValue> valueList = new ArrayList<MIValue>(); - List<MIResult> resultList = new ArrayList<MIResult>(); + List<MIValue> valueList = new ArrayList<>(); + List<MIResult> resultList = new ArrayList<>(); // Catch closing '}' while (buffer.length() > 0 && buffer.charAt(0) != '}') { // Try for the DsfMIValue first @@ -374,8 +374,8 @@ public class MIParser { */ private MIValue processMIList(FSB buffer) { MIList list = new MIList(); - List<MIValue> valueList = new ArrayList<MIValue>(); - List<MIResult> resultList = new ArrayList<MIResult>(); + List<MIValue> valueList = new ArrayList<>(); + List<MIResult> resultList = new ArrayList<>(); // catch closing ']' while (buffer.length() > 0 && buffer.charAt(0) != ']') { // Try for the DsfMIValue first diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIRegisterValue.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIRegisterValue.java index f1ad6e91557..55a27d530db 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIRegisterValue.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIRegisterValue.java @@ -51,7 +51,7 @@ public class MIRegisterValue { * [{number="1",value="0xffff"},{number="xxx",value="yyy"},..] */ public static MIRegisterValue[] getMIRegisterValues(MIList miList) { - List<MIRegisterValue> aList = new ArrayList<MIRegisterValue>(); + List<MIRegisterValue> aList = new ArrayList<>(); MIValue[] values = miList.getMIValues(); for (int i = 0; i < values.length; i++) { if (values[i] instanceof MITuple) { diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStackListArgumentsInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStackListArgumentsInfo.java index 73f5766fc46..e0e852c4e40 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStackListArgumentsInfo.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStackListArgumentsInfo.java @@ -28,7 +28,7 @@ public class MIStackListArgumentsInfo extends MIInfo { public MIStackListArgumentsInfo(MIOutput out) { super(out); frames = null; - List<MIFrame> aList = new ArrayList<MIFrame>(1); + List<MIFrame> aList = new ArrayList<>(1); if (isDone()) { MIResultRecord rr = out.getMIResultRecord(); if (rr != null) { diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStackListFramesInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStackListFramesInfo.java index 6b7e2858ab6..ff9b048a4f2 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStackListFramesInfo.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStackListFramesInfo.java @@ -27,7 +27,7 @@ public class MIStackListFramesInfo extends MIInfo { public MIStackListFramesInfo(MIOutput out) { super(out); frames = null; - List<MIFrame> aList = new ArrayList<MIFrame>(1); + List<MIFrame> aList = new ArrayList<>(1); if (isDone()) { MIResultRecord rr = out.getMIResultRecord(); if (rr != null) { diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStringHandler.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStringHandler.java index af9f9aef5a6..d9f0f76a2b6 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStringHandler.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIStringHandler.java @@ -35,7 +35,7 @@ public class MIStringHandler { * corresponding Unicode code point (i.e. character code). */ // Use a LinkedHashMap to preserve order, so as to get 'e' and not 'E' - private static Map<Character, Integer> fSpecialCharactersToCodePointMap = new LinkedHashMap<Character, Integer>(); + private static Map<Character, Integer> fSpecialCharactersToCodePointMap = new LinkedHashMap<>(); static { fSpecialCharactersToCodePointMap.put('a', 0x07); // Alert (bell) character fSpecialCharactersToCodePointMap.put('b', 0x08); // Backspace character diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MITraceListVariablesInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MITraceListVariablesInfo.java index 2362560b7ed..fc233a0c791 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MITraceListVariablesInfo.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MITraceListVariablesInfo.java @@ -60,7 +60,7 @@ public class MITraceListVariablesInfo extends MIInfo { } private void parse() { - List<MITraceVariableInfo> aList = new ArrayList<MITraceVariableInfo>(1); + List<MITraceVariableInfo> aList = new ArrayList<>(1); if (isDone()) { MIOutput out = getMIOutput(); MIResultRecord rr = out.getMIResultRecord(); diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MITuple.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MITuple.java index 148469c6cd7..33d926375ee 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MITuple.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MITuple.java @@ -50,7 +50,7 @@ public class MITuple extends MIValue { */ public MIValue getField(String name) { if (name2value == null) { - name2value = new HashMap<String, MIValue>(); + name2value = new HashMap<>(); for (MIResult r : results) { name2value.put(r.getVariable(), r.getMIValue()); } diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarListChildrenInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarListChildrenInfo.java index f0417d5deca..2282001ca28 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarListChildrenInfo.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarListChildrenInfo.java @@ -31,7 +31,7 @@ public class MIVarListChildrenInfo extends MIInfo { public MIVarListChildrenInfo(MIOutput record) { super(record); - List<MIVar> aList = new ArrayList<MIVar>(); + List<MIVar> aList = new ArrayList<>(); if (isDone()) { MIOutput out = getMIOutput(); MIResultRecord rr = out.getMIResultRecord(); diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarUpdateInfo.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarUpdateInfo.java index a24e25510c6..ef1d66834eb 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarUpdateInfo.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/mi/service/command/output/MIVarUpdateInfo.java @@ -29,7 +29,7 @@ public class MIVarUpdateInfo extends MIInfo { public MIVarUpdateInfo(MIOutput record) { super(record); - List<MIVarChange> aList = new ArrayList<MIVarChange>(); + List<MIVarChange> aList = new ArrayList<>(); if (isDone()) { MIOutput out = getMIOutput(); MIResultRecord rr = out.getMIResultRecord(); @@ -123,7 +123,7 @@ public class MIVarUpdateInfo extends MIInfo { } } else if (var.equals("new_children")) { //$NON-NLS-1$ if (change != null) { - List<MIVar> newChildren = new ArrayList<MIVar>(); + List<MIVar> newChildren = new ArrayList<>(); parseNewChildren(value, newChildren); change.setNewChildren(newChildren.toArray(new MIVar[newChildren.size()])); } |