From 3757c03fc8f138427e21c41ef5e66e8c5a98159c Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 9 Jan 2015 14:51:38 +0200 Subject: java: simplify array creation and remove the need to worry about keeping indexes correct Change-Id: I9a5fc00f7e28f305279b41099274c96daebebb95 --- .../ifc/configuration/backend/_XMultiLayerStratum.java | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'qadevOOo') diff --git a/qadevOOo/tests/java/ifc/configuration/backend/_XMultiLayerStratum.java b/qadevOOo/tests/java/ifc/configuration/backend/_XMultiLayerStratum.java index 55af96b9f861..0bbadd23dae4 100644 --- a/qadevOOo/tests/java/ifc/configuration/backend/_XMultiLayerStratum.java +++ b/qadevOOo/tests/java/ifc/configuration/backend/_XMultiLayerStratum.java @@ -67,9 +67,9 @@ public class _XMultiLayerStratum extends MultiMethodTest { boolean res = true; try { - String[] LayerIds = new String[2]; - LayerIds[0] = "1 /org/openoffice/Office/Jobs.xcu"; - LayerIds[1] = "2 /org/openoffice/Office/Linguistic.xcu"; + String[] LayerIds = new String[] { + "1 /org/openoffice/Office/Jobs.xcu", + "2 /org/openoffice/Office/Linguistic.xcu" }; XLayer[] Layers = oObj.getLayers(LayerIds, ""); res = Layers.length == 2; @@ -93,12 +93,10 @@ public class _XMultiLayerStratum extends MultiMethodTest { boolean res = true; try { - String[] LayerIds = new String[2]; - LayerIds[0] = "1 /org/openoffice/Office/Jobs.xcu"; - LayerIds[1] = "2 /org/openoffice/Office/Linguistic.xcu"; - String[] Times = new String[2]; - Times[0] = ""; - Times[1] = ""; + String[] LayerIds = new String[] { + "1 /org/openoffice/Office/Jobs.xcu", + "2 /org/openoffice/Office/Linguistic.xcu" }; + String[] Times = new String[] { "", "" }; XLayer[] Layers = oObj.getMultipleLayers(LayerIds, Times); res = Layers.length == 2; -- cgit