summaryrefslogtreecommitdiff
path: root/qadevOOo/tests/java
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-12-17 11:35:04 +0200
committerNoel Grandin <noel@peralex.com>2014-12-19 10:41:58 +0200
commit2d82619a528ebdf867f242c85ad626462609ba39 (patch)
tree4653347d1e28bb02a723be5c58b744d277e6697f /qadevOOo/tests/java
parent0ae24c2189ea68576c96fcbe87299b51256cb468 (diff)
java: static fields that should not be static
Found by FindBugs. Change-Id: I223841f7bb8c515c9612322abc0b13e134385abd
Diffstat (limited to 'qadevOOo/tests/java')
-rw-r--r--qadevOOo/tests/java/ifc/document/_XEventBroadcaster.java4
-rw-r--r--qadevOOo/tests/java/ifc/lang/_XComponent.java2
-rw-r--r--qadevOOo/tests/java/ifc/linguistic2/_XAvailableLocales.java3
-rw-r--r--qadevOOo/tests/java/ifc/linguistic2/_XSupportedLocales.java2
-rw-r--r--qadevOOo/tests/java/ifc/table/_XCellCursor.java5
-rw-r--r--qadevOOo/tests/java/ifc/text/_NumberingLevel.java10
-rw-r--r--qadevOOo/tests/java/mod/_acceptor/Acceptor.java2
7 files changed, 13 insertions, 15 deletions
diff --git a/qadevOOo/tests/java/ifc/document/_XEventBroadcaster.java b/qadevOOo/tests/java/ifc/document/_XEventBroadcaster.java
index 02c41b583378..b2b3ff3bb4ca 100644
--- a/qadevOOo/tests/java/ifc/document/_XEventBroadcaster.java
+++ b/qadevOOo/tests/java/ifc/document/_XEventBroadcaster.java
@@ -29,8 +29,8 @@ import com.sun.star.uno.UnoRuntime;
public class _XEventBroadcaster extends MultiMethodTest {
public XEventBroadcaster oObj;
- protected static boolean listenerCalled=false;
- private static XEventListener listener=null;
+ protected boolean listenerCalled = false;
+ private XEventListener listener = null;
public class MyEventListener implements XEventListener {
diff --git a/qadevOOo/tests/java/ifc/lang/_XComponent.java b/qadevOOo/tests/java/ifc/lang/_XComponent.java
index 184f6ccad2ab..c05b7c5deffe 100644
--- a/qadevOOo/tests/java/ifc/lang/_XComponent.java
+++ b/qadevOOo/tests/java/ifc/lang/_XComponent.java
@@ -113,7 +113,7 @@ public class _XComponent extends MultiMethodTest {
log.println(Thread.currentThread() + " is removing EL " + listener2);
} // finished _removeEventListener()
- static boolean disposed = false;
+ boolean disposed = false;
/**
* Disposes the object and then check appropriate listeners were
diff --git a/qadevOOo/tests/java/ifc/linguistic2/_XAvailableLocales.java b/qadevOOo/tests/java/ifc/linguistic2/_XAvailableLocales.java
index 41f093f72c17..0fb7e4f883b0 100644
--- a/qadevOOo/tests/java/ifc/linguistic2/_XAvailableLocales.java
+++ b/qadevOOo/tests/java/ifc/linguistic2/_XAvailableLocales.java
@@ -33,14 +33,13 @@ import lib.MultiMethodTest;
public class _XAvailableLocales extends MultiMethodTest {
public XAvailableLocales oObj = null;
- public static Locale[] locales = new Locale[0];
/**
* Test calls the method, stores returned value and checks it. <p>
* Has <b> OK </b> status if length of returned array isn't zero. <p>
*/
public void _getAvailableLocales() {
- locales = oObj.getAvailableLocales("com.sun.star.linguistic2.Hyphenator");
+ Locale[] locales = oObj.getAvailableLocales("com.sun.star.linguistic2.Hyphenator");
tRes.tested("getAvailableLocales()", locales.length > 0);
}
diff --git a/qadevOOo/tests/java/ifc/linguistic2/_XSupportedLocales.java b/qadevOOo/tests/java/ifc/linguistic2/_XSupportedLocales.java
index b70eecffd721..269e07c8ac15 100644
--- a/qadevOOo/tests/java/ifc/linguistic2/_XSupportedLocales.java
+++ b/qadevOOo/tests/java/ifc/linguistic2/_XSupportedLocales.java
@@ -35,7 +35,7 @@ import com.sun.star.linguistic2.XSupportedLocales;
public class _XSupportedLocales extends MultiMethodTest {
public XSupportedLocales oObj = null;
- public static Locale[] locales = new Locale[0];
+ public Locale[] locales = new Locale[0];
/**
* Test calls the method, stores returned value and checks it. <p>
diff --git a/qadevOOo/tests/java/ifc/table/_XCellCursor.java b/qadevOOo/tests/java/ifc/table/_XCellCursor.java
index 9c2591f91c42..a01c4667c5b1 100644
--- a/qadevOOo/tests/java/ifc/table/_XCellCursor.java
+++ b/qadevOOo/tests/java/ifc/table/_XCellCursor.java
@@ -54,8 +54,7 @@ import com.sun.star.uno.UnoRuntime;
*/
public class _XCellCursor extends MultiMethodTest {
- public static XCellCursor oObj = null;
- public static XSpreadsheet oSheet = null;
+ public XCellCursor oObj = null;
/**
* <code>XCellRangeAddressable</code> interface is queried
@@ -174,7 +173,7 @@ public class _XCellCursor extends MultiMethodTest {
*/
public void _gotoEnd(){
//gotoEnd gets it's own cursor to see a change
- oSheet = (XSpreadsheet) tEnv.getObjRelation("SHEET");
+ XSpreadsheet oSheet = (XSpreadsheet) tEnv.getObjRelation("SHEET");
XCellRange testRange = oSheet.getCellRangeByName("$A$1:$g$7") ;
XSheetCellRange testSheetRange = UnoRuntime.queryInterface(XSheetCellRange.class,testRange);
XSheetCellCursor oCellCursor = oSheet.createCursorByRange
diff --git a/qadevOOo/tests/java/ifc/text/_NumberingLevel.java b/qadevOOo/tests/java/ifc/text/_NumberingLevel.java
index bc9a59442146..a23c7fbcb150 100644
--- a/qadevOOo/tests/java/ifc/text/_NumberingLevel.java
+++ b/qadevOOo/tests/java/ifc/text/_NumberingLevel.java
@@ -64,9 +64,9 @@ import com.sun.star.beans.PropertyValue;
*/
public class _NumberingLevel {
- private static HashMap<String, Boolean> NumberingLevel = new HashMap<String,Boolean>();
- private static PropertyValue[] PropertyArray = null;
- private static LogWriter log = null;
+ private HashMap<String, Boolean> NumberingLevel = new HashMap<String,Boolean>();
+ private PropertyValue[] PropertyArray = null;
+ private LogWriter log = null;
/**
@@ -77,9 +77,9 @@ public class _NumberingLevel {
*/
public _NumberingLevel(LogWriter log, TestParameters tParam, PropertyValue[] propertyValues){
- _NumberingLevel.PropertyArray = propertyValues;
+ this.PropertyArray = propertyValues;
- _NumberingLevel.log = log;
+ this.log = log;
//key = PropertyName, value = Ooptional
NumberingLevel.put("Adjust", Boolean.FALSE);
diff --git a/qadevOOo/tests/java/mod/_acceptor/Acceptor.java b/qadevOOo/tests/java/mod/_acceptor/Acceptor.java
index 67c479485abd..11b1a650df91 100644
--- a/qadevOOo/tests/java/mod/_acceptor/Acceptor.java
+++ b/qadevOOo/tests/java/mod/_acceptor/Acceptor.java
@@ -45,7 +45,7 @@ public class Acceptor extends TestCase {
*/
protected static final int basePort = 10000;
private int curPort ;
- private static String sOfficeHost = null ;
+ private String sOfficeHost = null ;
/**
* Retrieves host name where StarOffice is started from test