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>
This commit is contained in:
Caolán McNamara 2022-09-06 12:41:25 +01:00
parent 5c365c62aa
commit 6bad4f6aed
2 changed files with 4 additions and 4 deletions

View file

@ -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);
}

View file

@ -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();
}
}
}