summaryrefslogtreecommitdiff
path: root/qadevOOo
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-09-06 12:41:25 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-09-06 16:28:30 +0200
commit6bad4f6aed63c3fd54c46b269a285013e3ced553 (patch)
treedbd1b0b9a04aa393f1f372c389c0b18f98dd6235 /qadevOOo
parent5c365c62aafc12f16bfcfe3804f95f2bb45c7421 (diff)
cid#1509284 DMI: Dubious method invocation
Change-Id: I1fd1f710ae2a6b8ebc9506a56d522006509fc935 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139515 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'qadevOOo')
-rw-r--r--qadevOOo/tests/java/ifc/beans/_XFastPropertySet.java3
-rw-r--r--qadevOOo/tests/java/ifc/table/_XAutoFormattable.java5
2 files changed, 4 insertions, 4 deletions
diff --git a/qadevOOo/tests/java/ifc/beans/_XFastPropertySet.java b/qadevOOo/tests/java/ifc/beans/_XFastPropertySet.java
index 8ab74dcda173..a7821ba2b88d 100644
--- a/qadevOOo/tests/java/ifc/beans/_XFastPropertySet.java
+++ b/qadevOOo/tests/java/ifc/beans/_XFastPropertySet.java
@@ -53,6 +53,8 @@ import com.sun.star.uno.UnoRuntime;
* @see com.sun.star.beans.XFastPropertySet
*/
public class _XFastPropertySet extends MultiMethodTest {
+ public Random rnd = new Random();
+
private static final class Prop {
public final int handle;
public final String name;
@@ -184,7 +186,6 @@ public class _XFastPropertySet extends MultiMethodTest {
props.add(new Prop(handle, name));
} // endfor
- Random rnd = new Random();
int nr = rnd.nextInt(props.size());
prop = props.get(nr);
}
diff --git a/qadevOOo/tests/java/ifc/table/_XAutoFormattable.java b/qadevOOo/tests/java/ifc/table/_XAutoFormattable.java
index 6473f17b7380..0c1d9a30009c 100644
--- a/qadevOOo/tests/java/ifc/table/_XAutoFormattable.java
+++ b/qadevOOo/tests/java/ifc/table/_XAutoFormattable.java
@@ -44,6 +44,7 @@ import com.sun.star.uno.XInterface;
*/
public class _XAutoFormattable extends MultiMethodTest {
public XAutoFormattable oObj = null;
+ public Random rnd = new Random();
/**
* First 'Default' autoformat is set and a background of a cell
@@ -82,8 +83,6 @@ public class _XAutoFormattable extends MultiMethodTest {
String[] names = formats.getElementNames();
// getting one random not default style name
- Random rnd = new Random();
-
if (names.length > 1) {
while (name.equals("Default")) {
name = names[rnd.nextInt(names.length)];
@@ -123,4 +122,4 @@ public class _XAutoFormattable extends MultiMethodTest {
protected void after() {
disposeEnvironment();
}
-} \ No newline at end of file
+}