summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorRobert Antoni Buj i Gelonch <robert.buj@gmail.com>2014-10-02 01:56:04 +0200
committerNoel Grandin <noelgrandin@gmail.com>2014-10-02 04:26:40 +0000
commit30e2cb020b3492b879404072748960bc46d6e221 (patch)
tree68670728310f15969a9ac7933db80017a4645ad2 /qadevOOo
parenta131feddd07bcb75112b1f80a16b8733458338e4 (diff)
runner: Converting ArrayList to Array
Change-Id: Ifd5fe63cb00dd5b3987035201554731075d3bc00 Reviewed-on: https://gerrit.libreoffice.org/11755 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/runner/helper/APIDescGetter.java17
-rw-r--r--qadevOOo/runner/helper/ComplexDescGetter.java3
-rw-r--r--qadevOOo/runner/helper/PropertyHelper.java2
3 files changed, 4 insertions, 18 deletions
diff --git a/qadevOOo/runner/helper/APIDescGetter.java b/qadevOOo/runner/helper/APIDescGetter.java
index 7d83ef383e13..978af46d4345 100644
--- a/qadevOOo/runner/helper/APIDescGetter.java
+++ b/qadevOOo/runner/helper/APIDescGetter.java
@@ -820,16 +820,9 @@ public class APIDescGetter extends DescGetter
}
}
- String[] scenario = new String[componentList.size()];
Collections.sort(componentList);
-
- for (int i = 0; i < componentList.size(); i++)
- {
- scenario[i] = componentList.get(i);
- }
-
+ String[] scenario = componentList.toArray(new String[componentList.size()]);
return scenario;
-
}
private String[] getScenarioFromClassPath(String job)
@@ -892,14 +885,8 @@ public class APIDescGetter extends DescGetter
e.printStackTrace();
}
- String[] scenario = new String[scenarioList.size()];
Collections.sort(scenarioList);
-
- for (int i = 0; i < scenarioList.size(); i++)
- {
- scenario[i] = scenarioList.get(i);
- }
-
+ String[] scenario = scenarioList.toArray(new String[scenarioList.size()]);
return scenario;
}
diff --git a/qadevOOo/runner/helper/ComplexDescGetter.java b/qadevOOo/runner/helper/ComplexDescGetter.java
index af288a514319..1c2099cce8d9 100644
--- a/qadevOOo/runner/helper/ComplexDescGetter.java
+++ b/qadevOOo/runner/helper/ComplexDescGetter.java
@@ -103,8 +103,7 @@ public class ComplexDescGetter extends DescGetter
methods.add(meth);
}
- methodNames = new String[methods.size()];
- methodNames = methods.toArray(methodNames);
+ methodNames = methods.toArray(new String[methods.size()]);
}
// create an instance
diff --git a/qadevOOo/runner/helper/PropertyHelper.java b/qadevOOo/runner/helper/PropertyHelper.java
index 7472024c0afc..b5391cd40823 100644
--- a/qadevOOo/runner/helper/PropertyHelper.java
+++ b/qadevOOo/runner/helper/PropertyHelper.java
@@ -30,7 +30,7 @@ public class PropertyHelper
public static PropertyValue[] createPropertyValueArrayFormArrayList(ArrayList<PropertyValue> _aPropertyList)
{
// copy the whole PropertyValue List to an PropertyValue Array
- PropertyValue[] aSaveProperties = null;
+ PropertyValue[] aSaveProperties;
if (_aPropertyList == null)
{