diff options
author | Lars Vogel | 2020-01-20 09:15:29 +0000 |
---|---|---|
committer | Lars Vogel | 2020-01-20 11:40:24 +0000 |
commit | abea61af946d53de0baa75846690dc9026da37ba (patch) | |
tree | 7c0a36620d03dda3f0bff5662b4f7524c605d4da | |
parent | 87f808ddd42862847c75bd5374658ca3618e8127 (diff) | |
download | eclipse.platform.debug-abea61af946d53de0baa75846690dc9026da37ba.tar.gz eclipse.platform.debug-abea61af946d53de0baa75846690dc9026da37ba.tar.xz eclipse.platform.debug-abea61af946d53de0baa75846690dc9026da37ba.zip |
Use ArrayList instead of VectorY20200121-0055Y20200120-2315I20200121-2225I20200121-1805I20200120-1800I20200120-0715
Vector is an outdated data structure and ArrayList should be preferred
as it is faster.
Change-Id: I93106bc75dfd76b9118ae607c0504efacd91ce3f
Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
2 files changed, 3 insertions, 4 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockContentAdapter.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockContentAdapter.java index 89872dcb5..448cbb060 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockContentAdapter.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/elements/adapters/MemoryBlockContentAdapter.java @@ -19,7 +19,6 @@ package org.eclipse.debug.internal.ui.elements.adapters; import java.math.BigInteger; import java.util.ArrayList; import java.util.Collections; -import java.util.Vector; import org.eclipse.core.runtime.CoreException; import org.eclipse.debug.core.DebugException; @@ -393,7 +392,7 @@ public class MemoryBlockContentAdapter extends AsynchronousContentAdapter { } private Object[] organizeLines(long numberOfLines, MemoryByte[] memoryBuffer, BigInteger address, boolean manageDelta, MemoryViewPresentationContext context) { - Vector<MemorySegment> lineCache = new Vector<>(); + ArrayList<MemorySegment> lineCache = new ArrayList<>(); IMemoryRendering rendering = context.getRendering(); if (!(rendering instanceof AbstractAsyncTableRendering)) { return lineCache.toArray(); diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchHistory.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchHistory.java index 5443526c7..4c84ff29d 100644 --- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchHistory.java +++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchHistory.java @@ -51,7 +51,7 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe /** * Ordered listing of the favorites of this history */ - private Vector<ILaunchConfiguration> fFavorites = new Vector<>(); + private List<ILaunchConfiguration> fFavorites = new ArrayList<>(); /** * A new saved flag to prevent save participants from serializing unchanged launch histories. @@ -230,7 +230,7 @@ public class LaunchHistory implements ILaunchListener, ILaunchConfigurationListe * @since 3.3 */ public synchronized ILaunchConfiguration[] getCompleteLaunchHistory() { - Vector<ILaunchConfiguration> history = new Vector<>(); + ArrayList<ILaunchConfiguration> history = new ArrayList<>(); try { for (ILaunchConfiguration config : fCompleteHistory) { if(config.exists() && DebugUIPlugin.doLaunchConfigurationFiltering(config) && |