qadevOOo/runner/graphical/IniFile.java | 7 +++---- qadevOOo/runner/share/DescGetter.java | 7 +++---- toolkit/test/accessibility/AccTreeNode.java | 6 ++---- 3 files changed, 8 insertions(+), 12 deletions(-)
New commits: commit d0be30e8eec9d982501e8727df05962572c7acc6 Author: Robert Antoni Buj i Gelonch <robert....@gmail.com> Date: Mon Oct 13 16:05:18 2014 +0200 java: Collections.addAll for adding an array of elements to a Collection Change-Id: I4689aa73e1e261c6461e04b9e814ffefa5817c09 Reviewed-on: https://gerrit.libreoffice.org/11953 Reviewed-by: Noel Grandin <noelgran...@gmail.com> Tested-by: Noel Grandin <noelgran...@gmail.com> diff --git a/qadevOOo/runner/graphical/IniFile.java b/qadevOOo/runner/graphical/IniFile.java index f6b371f..fe2df6e 100644 --- a/qadevOOo/runner/graphical/IniFile.java +++ b/qadevOOo/runner/graphical/IniFile.java @@ -19,7 +19,9 @@ package graphical; import java.io.File; import java.io.RandomAccessFile; + import java.util.ArrayList; +import java.util.Arrays; import java.util.Enumeration; /** @@ -55,10 +57,7 @@ public class IniFile implements Enumeration<String> if (m_aList.isEmpty()) { // can only insert if there is nothing else already in the ini file - for (int i = 0; i < _aList.length; i++) - { - m_aList.add(_aList[i]); - } + m_aList.addAll(Arrays.asList(_aList)); } } diff --git a/qadevOOo/runner/share/DescGetter.java b/qadevOOo/runner/share/DescGetter.java index 53e0f93..892a33d 100644 --- a/qadevOOo/runner/share/DescGetter.java +++ b/qadevOOo/runner/share/DescGetter.java @@ -19,7 +19,9 @@ package share; import java.io.BufferedReader; import java.io.FileReader; + import java.util.ArrayList; +import java.util.Arrays; import java.util.StringTokenizer; /** @@ -108,10 +110,7 @@ public abstract class DescGetter line.length()).trim(), descPath, debug); - for (int i = 0; i < subs.length; i++) - { - entryList.add(subs[i]); - } + entryList.addAll(Arrays.asList(subs)); } else if (line.startsWith("-p")) { diff --git a/toolkit/test/accessibility/AccTreeNode.java b/toolkit/test/accessibility/AccTreeNode.java index 136f872..73fa129 100644 --- a/toolkit/test/accessibility/AccTreeNode.java +++ b/toolkit/test/accessibility/AccTreeNode.java @@ -17,6 +17,7 @@ */ import java.util.ArrayList; +import java.util.Arrays; import com.sun.star.accessibility.XAccessible; import com.sun.star.accessibility.XAccessibleComponent; @@ -299,10 +300,7 @@ class AccTreeNode HandlerDescriptor aDescriptor = getHandlerDescriptor (i); NodeHandler aHandler = aDescriptor.maHandler; String[] aHandlerActions = aHandler.getActions (this); - for(int j = 0; j < aHandlerActions.length; j++ ) - { - aActions.add( aHandlerActions[j] ); - } + aActions.addAll(Arrays.asList(aHandlerActions)); } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits