Kaydet (Commit) 30e2cb02 authored tarafından Robert Antoni Buj i Gelonch's avatar Robert Antoni Buj i Gelonch Kaydeden (comit) Noel Grandin

runner: Converting ArrayList to Array

Change-Id: Ifd5fe63cb00dd5b3987035201554731075d3bc00
Reviewed-on: https://gerrit.libreoffice.org/11755Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
Tested-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst a131fedd
...@@ -820,16 +820,9 @@ public class APIDescGetter extends DescGetter ...@@ -820,16 +820,9 @@ public class APIDescGetter extends DescGetter
} }
} }
String[] scenario = new String[componentList.size()];
Collections.sort(componentList); Collections.sort(componentList);
String[] scenario = componentList.toArray(new String[componentList.size()]);
for (int i = 0; i < componentList.size(); i++)
{
scenario[i] = componentList.get(i);
}
return scenario; return scenario;
} }
private String[] getScenarioFromClassPath(String job) private String[] getScenarioFromClassPath(String job)
...@@ -892,14 +885,8 @@ public class APIDescGetter extends DescGetter ...@@ -892,14 +885,8 @@ public class APIDescGetter extends DescGetter
e.printStackTrace(); e.printStackTrace();
} }
String[] scenario = new String[scenarioList.size()];
Collections.sort(scenarioList); Collections.sort(scenarioList);
String[] scenario = scenarioList.toArray(new String[scenarioList.size()]);
for (int i = 0; i < scenarioList.size(); i++)
{
scenario[i] = scenarioList.get(i);
}
return scenario; return scenario;
} }
......
...@@ -103,8 +103,7 @@ public class ComplexDescGetter extends DescGetter ...@@ -103,8 +103,7 @@ public class ComplexDescGetter extends DescGetter
methods.add(meth); methods.add(meth);
} }
methodNames = new String[methods.size()]; methodNames = methods.toArray(new String[methods.size()]);
methodNames = methods.toArray(methodNames);
} }
// create an instance // create an instance
......
...@@ -30,7 +30,7 @@ public class PropertyHelper ...@@ -30,7 +30,7 @@ public class PropertyHelper
public static PropertyValue[] createPropertyValueArrayFormArrayList(ArrayList<PropertyValue> _aPropertyList) public static PropertyValue[] createPropertyValueArrayFormArrayList(ArrayList<PropertyValue> _aPropertyList)
{ {
// copy the whole PropertyValue List to an PropertyValue Array // copy the whole PropertyValue List to an PropertyValue Array
PropertyValue[] aSaveProperties = null; PropertyValue[] aSaveProperties;
if (_aPropertyList == null) if (_aPropertyList == null)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment