From: Bernd Hufmann Date: Fri, 27 Mar 2015 16:46:00 +0000 (-0400) Subject: tmf remote: use System.arraycopy instead of manually coppy array. X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=b31bffca22a9d3c057927b065993e0158214b1f9;p=deliverable%2Ftracecompass.git tmf remote: use System.arraycopy instead of manually coppy array. Change-Id: If697e6208f1abd387a8678a3c7f30561dc6f62d5 Signed-off-by: Bernd Hufmann Reviewed-on: https://git.eclipse.org/r/44775 Reviewed-by: Patrick Tasse Tested-by: Patrick Tasse Reviewed-by: Hudson CI --- diff --git a/org.eclipse.tracecompass.tmf.remote.ui/src/org/eclipse/tracecompass/internal/tmf/remote/ui/wizards/fetch/preferences/RemoteProfilesPreferencePage.java b/org.eclipse.tracecompass.tmf.remote.ui/src/org/eclipse/tracecompass/internal/tmf/remote/ui/wizards/fetch/preferences/RemoteProfilesPreferencePage.java index f6a7305c51..030f4b5887 100644 --- a/org.eclipse.tracecompass.tmf.remote.ui/src/org/eclipse/tracecompass/internal/tmf/remote/ui/wizards/fetch/preferences/RemoteProfilesPreferencePage.java +++ b/org.eclipse.tracecompass.tmf.remote.ui/src/org/eclipse/tracecompass/internal/tmf/remote/ui/wizards/fetch/preferences/RemoteProfilesPreferencePage.java @@ -890,9 +890,7 @@ public class RemoteProfilesPreferencePage extends PreferencePage implements IWor String[] availableTraceTypes = TmfTraceType.getAvailableTraceTypes(); String[] traceTypeList = new String[availableTraceTypes.length + 1]; traceTypeList[0] = TRACE_TYPE_AUTO_DETECT; - for (int i = 0; i < availableTraceTypes.length; i++) { - traceTypeList[i + 1] = availableTraceTypes[i]; - } + System.arraycopy(availableTraceTypes, 0, traceTypeList, 1, availableTraceTypes.length); combo.setItems(traceTypeList); combo.select(0); for (int i = 1; i < traceTypeList.length; i++) {