diff options
author | Noel Grandin <noel@peralex.com> | 2012-06-27 15:09:57 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-06-29 22:03:00 +0200 |
commit | 10dd7e74c551f3e252405ba0f80a2f143d9129e5 (patch) | |
tree | 1d0edc56a84a20c01248622cd8d8cb1dad0266ef /qadevOOo | |
parent | Java cleanup - remove meaningless comments (diff) | |
download | core-10dd7e74c551f3e252405ba0f80a2f143d9129e5.tar.gz core-10dd7e74c551f3e252405ba0f80a2f143d9129e5.zip |
Java5 update - convert Vector to ArrayList
Change-Id: I630b22da7fbfd2a1c821420d045146e5042c5c28
Diffstat (limited to 'qadevOOo')
30 files changed, 177 insertions, 171 deletions
diff --git a/qadevOOo/runner/base/java_fat.java b/qadevOOo/runner/base/java_fat.java index 5300955b6ed6..d80167fa268d 100644 --- a/qadevOOo/runner/base/java_fat.java +++ b/qadevOOo/runner/base/java_fat.java @@ -17,15 +17,13 @@ */ package base; -import com.sun.star.lang.XMultiServiceFactory; - import helper.APIDescGetter; import helper.AppProvider; import java.io.BufferedReader; import java.io.FileReader; import java.io.PrintWriter; - +import java.util.ArrayList; import java.util.Vector; import lib.MultiMethodTest; @@ -33,16 +31,15 @@ import lib.TestCase; import lib.TestEnvironment; import lib.TestParameters; import lib.TestResult; - import share.DescEntry; import share.DescGetter; import share.LogWriter; - import stats.OutProducerFactory; import stats.Summarizer; - import util.DynamicClassLoader; +import com.sun.star.lang.XMultiServiceFactory; + /** * * this class handles tests written in java and running on a fat Office @@ -68,7 +65,7 @@ public class java_fat implements TestBase DescGetter dg = new APIDescGetter(); String job = (String) m_aParams.get("TestJob"); String ExclusionFile = (String) m_aParams.get("ExclusionList"); - Vector exclusions = null; + ArrayList exclusions = null; boolean retValue = true; m_isDebug = m_aParams.getBool("DebugIsActive"); logging = m_aParams.getBool("LoggingIsActive"); @@ -497,9 +494,9 @@ public class java_fat implements TestBase // } // } - private Vector getExclusionList(String url, boolean debug) + private ArrayList getExclusionList(String url, boolean debug) { - Vector entryList = new Vector(); + ArrayList entryList = new ArrayList(); String line = "#"; BufferedReader exclusion = null; diff --git a/qadevOOo/runner/complexlib/ShowTargets.java b/qadevOOo/runner/complexlib/ShowTargets.java index 89bc33daa8e2..335614c0d2e4 100644 --- a/qadevOOo/runner/complexlib/ShowTargets.java +++ b/qadevOOo/runner/complexlib/ShowTargets.java @@ -18,6 +18,8 @@ package complexlib; +import java.util.ArrayList; + /** * * @author fs93730 @@ -31,8 +33,8 @@ public class ShowTargets public static void main( String[] args ) { - java.util.Vector targets = new java.util.Vector(); - java.util.Vector descs = new java.util.Vector(); + ArrayList targets = new ArrayList(); + ArrayList descs = new ArrayList(); targets.add( "run" ); descs.add( "runs all complex tests in this module" ); diff --git a/qadevOOo/runner/helper/ComplexDescGetter.java b/qadevOOo/runner/helper/ComplexDescGetter.java index c0c3b6e0fadd..413733342be1 100644 --- a/qadevOOo/runner/helper/ComplexDescGetter.java +++ b/qadevOOo/runner/helper/ComplexDescGetter.java @@ -17,13 +17,15 @@ */ package helper; -import complexlib.ComplexTestCase; -import util.DynamicClassLoader; +import java.util.ArrayList; + +import share.ComplexTest; import share.DescEntry; import share.DescGetter; -import share.ComplexTest; -import java.util.Vector; import share.LogWriter; +import util.DynamicClassLoader; + +import complexlib.ComplexTestCase; /** * @@ -83,7 +85,7 @@ public class ComplexDescGetter extends DescGetter // case3: method1(param1,param2),method2(param1,param2) String method = className.substring(index + 2); className = className.substring(0, index); - Vector methods = new Vector(); + ArrayList methods = new ArrayList(); String[] split = method.split("(?<=\\)),(?=\\w+)"); diff --git a/qadevOOo/runner/helper/URLHelper.java b/qadevOOo/runner/helper/URLHelper.java index 5baaf23b053f..c33ac40ffb8b 100644 --- a/qadevOOo/runner/helper/URLHelper.java +++ b/qadevOOo/runner/helper/URLHelper.java @@ -21,16 +21,13 @@ package helper; // __________ Imports __________ // exceptions +import java.io.File; import java.net.MalformedURLException; +import java.util.ArrayList; +import java.util.Iterator; -// interfaces import com.sun.star.util.XURLTransformer; -// others -import java.io.File; -import java.util.Vector; -import java.util.Enumeration; - /** * It collects some static helper functons to handle URLs. @@ -243,7 +240,7 @@ public class URLHelper * a filtered list of java File objects of all available files of the start dir * and all accessable sub directories. */ - public static Vector getSystemFilesFromDir(String sStartDir) + public static ArrayList getSystemFilesFromDir(String sStartDir) { File aRoot = new File(sStartDir); @@ -257,7 +254,7 @@ public class URLHelper if (lAllFiles == null ) return null; - Vector lFilteredFiles = new Vector(lAllFiles.length); + ArrayList lFilteredFiles = new ArrayList(lAllFiles.length); for (int i=0; i<lAllFiles.length; ++i) { @@ -267,12 +264,12 @@ public class URLHelper if (lAllFiles[i].isDirectory()) { // recursion! - Vector lSubFiles = URLHelper.getSystemFilesFromDir(lAllFiles[i].getPath()); + ArrayList lSubFiles = URLHelper.getSystemFilesFromDir(lAllFiles[i].getPath()); if (lSubFiles != null) { - Enumeration aSnapshot = lSubFiles.elements(); - while (aSnapshot.hasMoreElements()) - lFilteredFiles.add(aSnapshot.nextElement()); + Iterator aSnapshot = lSubFiles.iterator(); + while (aSnapshot.hasNext()) + lFilteredFiles.add(aSnapshot.next()); } } } diff --git a/qadevOOo/runner/lib/MultiMethodTest.java b/qadevOOo/runner/lib/MultiMethodTest.java index fdd0d746d0ae..004dd448fb74 100644 --- a/qadevOOo/runner/lib/MultiMethodTest.java +++ b/qadevOOo/runner/lib/MultiMethodTest.java @@ -21,15 +21,14 @@ import java.io.PrintWriter; import java.lang.reflect.Field; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; -import java.util.Vector; - -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; +import java.util.ArrayList; import share.DescEntry; -import lib.TestParameters; import stats.Summarizer; +import com.sun.star.uno.UnoRuntime; +import com.sun.star.uno.XInterface; + /** * The class supports method based interface tests development. * @@ -96,9 +95,9 @@ public class MultiMethodTest */ protected TestResult tRes; /** - * Contains names of the methods have been alreadycalled + * Contains names of the methods have been already called */ - private Vector methCalled = new Vector(10); + private ArrayList methCalled = new ArrayList(10); /** * Disposes the test environment, which was corrupted by the test. diff --git a/qadevOOo/runner/org/openoffice/RunnerService.java b/qadevOOo/runner/org/openoffice/RunnerService.java index e97cb0365948..6a0d131f6386 100644 --- a/qadevOOo/runner/org/openoffice/RunnerService.java +++ b/qadevOOo/runner/org/openoffice/RunnerService.java @@ -18,27 +18,29 @@ package org.openoffice; +import helper.CfgParser; +import helper.ClParser; + +import java.util.ArrayList; + +import lib.TestParameters; import share.LogWriter; import stats.InternalLogWriter; -import lib.TestParameters; import util.DynamicClassLoader; import base.TestBase; -import helper.ClParser; -import helper.CfgParser; -import com.sun.star.beans.XPropertyAccess; + +import com.sun.star.beans.NamedValue; import com.sun.star.beans.PropertyValue; -import com.sun.star.task.XJob; -import com.sun.star.uno.XInterface; +import com.sun.star.beans.XPropertyAccess; import com.sun.star.comp.loader.FactoryHelper; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.lang.XServiceInfo; import com.sun.star.lang.XSingleServiceFactory; import com.sun.star.lang.XTypeProvider; -import com.sun.star.uno.Type; import com.sun.star.registry.XRegistryKey; -import com.sun.star.beans.NamedValue; - -import java.util.Vector; +import com.sun.star.task.XJob; +import com.sun.star.uno.Type; +import com.sun.star.uno.XInterface; /** * The main class, will call ClParser and CfgParser to <br> @@ -211,7 +213,7 @@ public class RunnerService implements XJob, XServiceInfo, return pVal; } - Vector v = new Vector(600); + ArrayList v = new ArrayList(600); try { // open connection to Jar java.net.JarURLConnection con = diff --git a/qadevOOo/runner/share/DescGetter.java b/qadevOOo/runner/share/DescGetter.java index 5c86dccb47a6..7ab8b2de044f 100644 --- a/qadevOOo/runner/share/DescGetter.java +++ b/qadevOOo/runner/share/DescGetter.java @@ -46,7 +46,7 @@ public abstract class DescGetter protected DescEntry[] getScenario(String url, String descPath, boolean debug) { - Vector entryList = new Vector(); + ArrayList entryList = new ArrayList(); String line = ""; BufferedReader scenario = null; DescEntry[] entries = null; diff --git a/qadevOOo/runner/stats/SQLExecution.java b/qadevOOo/runner/stats/SQLExecution.java index ead90eb5eb6f..b817ce25af9b 100644 --- a/qadevOOo/runner/stats/SQLExecution.java +++ b/qadevOOo/runner/stats/SQLExecution.java @@ -22,10 +22,10 @@ import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.Statement; +import java.util.ArrayList; import java.util.Enumeration; import java.util.Hashtable; import java.util.StringTokenizer; -import java.util.Vector; /** * @@ -148,7 +148,7 @@ public class SQLExecution { return false; } } - Vector sqlCommand = new Vector(); + ArrayList sqlCommand = new ArrayList(); sqlCommand.add(""); boolean update = false; // synchronize all "$varname" occurrences in the command string with @@ -273,7 +273,7 @@ public class SQLExecution { for(int i=1; i<=columnCount; i++) { columnNames[i-1] = sqlRSMeta.getColumnName(i); // initialize output - Vector v = new Vector(); + ArrayList v = new ArrayList(); sqlResult.beforeFirst(); while (sqlResult.next()) { diff --git a/qadevOOo/runner/stats/Summarizer.java b/qadevOOo/runner/stats/Summarizer.java index ad9d279a913f..3d9afbc10ad8 100644 --- a/qadevOOo/runner/stats/Summarizer.java +++ b/qadevOOo/runner/stats/Summarizer.java @@ -17,7 +17,8 @@ */ package stats; -import java.util.Vector; +import java.util.ArrayList; + import share.DescEntry; /** @@ -41,8 +42,8 @@ public class Summarizer } int count = entry.SubEntryCount; int knownIssues = 0; - Vector failures = new Vector(); - Vector states = new Vector(); + ArrayList failures = new ArrayList(); + ArrayList states = new ArrayList(); for (int i = 0; i < count; i++) { if (entry.SubEntries[i].State == null) @@ -67,14 +68,14 @@ public class Summarizer String state = "PASSED.FAILED"; for (int j = 0; j < failures.size(); j++) { - if (states.elementAt(j).equals("not part of the job")) + if (states.get(j).equals("not part of the job")) { state = "PASSED(some interfaces/services not tested).OK"; } else { errMsg += - failures.elementAt(j) + " - " + states.elementAt(j) + "\r\n"; + failures.get(j) + " - " + states.get(j) + "\r\n"; } } entry.hasErrorMsg = true; diff --git a/qadevOOo/runner/util/DesktopTools.java b/qadevOOo/runner/util/DesktopTools.java index b29ec7127a36..0c7e6b3913d4 100644 --- a/qadevOOo/runner/util/DesktopTools.java +++ b/qadevOOo/runner/util/DesktopTools.java @@ -17,11 +17,17 @@ */ package util; +import helper.ConfigHelper; + +import java.util.ArrayList; + +import lib.StatusException; + import com.sun.star.awt.Rectangle; import com.sun.star.awt.WindowDescriptor; import com.sun.star.awt.XToolkit; -import com.sun.star.awt.XWindowPeer; import com.sun.star.awt.XTopWindow; +import com.sun.star.awt.XWindowPeer; import com.sun.star.beans.PropertyValue; import com.sun.star.beans.XPropertySet; import com.sun.star.container.XEnumeration; @@ -34,15 +40,10 @@ import com.sun.star.lang.XComponent; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.lang.XServiceInfo; import com.sun.star.uno.UnoRuntime; - -// access the implementations via names import com.sun.star.uno.XInterface; import com.sun.star.util.XCloseable; import com.sun.star.util.XModifiable; import com.sun.star.view.XViewSettingsSupplier; -import helper.ConfigHelper; -import java.util.Vector; -import lib.StatusException; /** * contains helper methods for the Desktop @@ -137,7 +138,7 @@ public class DesktopTools */ public static Object[] getAllOpenDocuments(XMultiServiceFactory xMSF) { - Vector components = new Vector(); + ArrayList components = new ArrayList(); XDesktop xDesktop = (XDesktop) UnoRuntime.queryInterface( XDesktop.class, createDesktop(xMSF)); diff --git a/qadevOOo/runner/util/UITools.java b/qadevOOo/runner/util/UITools.java index f9877c764fc3..a489498fd8b4 100644 --- a/qadevOOo/runner/util/UITools.java +++ b/qadevOOo/runner/util/UITools.java @@ -18,30 +18,29 @@ package util; -import com.sun.star.awt.Point; -import com.sun.star.awt.XTopWindow; -import com.sun.star.awt.XWindow; -import com.sun.star.text.XTextDocument; -import com.sun.star.uno.UnoRuntime; +import java.awt.Robot; +import java.awt.event.InputEvent; +import java.io.PrintWriter; +import java.util.ArrayList; -import com.sun.star.frame.XModel; -import com.sun.star.uno.XInterface; +import com.sun.star.accessibility.AccessibleRole; import com.sun.star.accessibility.XAccessible; import com.sun.star.accessibility.XAccessibleAction; -import com.sun.star.accessibility.AccessibleRole; import com.sun.star.accessibility.XAccessibleComponent; -import com.sun.star.awt.XExtendedToolkit; import com.sun.star.accessibility.XAccessibleContext; import com.sun.star.accessibility.XAccessibleEditableText; import com.sun.star.accessibility.XAccessibleSelection; import com.sun.star.accessibility.XAccessibleText; import com.sun.star.accessibility.XAccessibleValue; +import com.sun.star.awt.Point; +import com.sun.star.awt.XExtendedToolkit; +import com.sun.star.awt.XTopWindow; +import com.sun.star.awt.XWindow; +import com.sun.star.frame.XModel; import com.sun.star.lang.XMultiServiceFactory; -import java.awt.Robot; -import java.awt.event.InputEvent; -import java.io.PrintWriter; -import java.util.Vector; -import util.AccessibilityTools; +import com.sun.star.text.XTextDocument; +import com.sun.star.uno.UnoRuntime; +import com.sun.star.uno.XInterface; /** @@ -330,7 +329,7 @@ public class UITools { public Object[] getListBoxObjects(String ListBoxName) throws java.lang.Exception { - Vector Items = new Vector(); + ArrayList Items = new ArrayList(); try { XAccessibleContext xListBox = null; XAccessibleContext xList = null; @@ -394,7 +393,7 @@ public class UITools { public String[] getListBoxItems(String ListBoxName) throws java.lang.Exception { - Vector Items = new Vector(); + ArrayList Items = new ArrayList(); try { XAccessibleContext xListBox = null; XAccessibleContext xList = null; diff --git a/qadevOOo/runner/util/XMLTools.java b/qadevOOo/runner/util/XMLTools.java index ef7cc12fd96f..c5acb225b048 100644 --- a/qadevOOo/runner/util/XMLTools.java +++ b/qadevOOo/runner/util/XMLTools.java @@ -18,32 +18,32 @@ package util; -import java.io.PrintWriter ; -import java.util.Vector ; -import java.util.Hashtable ; -import java.util.Enumeration ; -import java.util.HashSet ; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.HashSet; +import java.util.Hashtable; +import java.util.Vector; -// access the implementations via names -import com.sun.star.uno.XInterface; -import com.sun.star.io.XOutputStream; -import com.sun.star.io.XInputStream; +import com.sun.star.beans.PropertyValue; +import com.sun.star.document.XExporter; +import com.sun.star.document.XFilter; +import com.sun.star.document.XImporter; import com.sun.star.io.XActiveDataSource; -import com.sun.star.ucb.XSimpleFileAccess; +import com.sun.star.io.XInputStream; +import com.sun.star.io.XOutputStream; +import com.sun.star.lang.XComponent; import com.sun.star.lang.XMultiServiceFactory; -import com.sun.star.xml.sax.XDocumentHandler; +import com.sun.star.ucb.XSimpleFileAccess; import com.sun.star.uno.Any; import com.sun.star.uno.Type; import com.sun.star.uno.UnoRuntime; -import com.sun.star.beans.PropertyValue; -import com.sun.star.xml.sax.XLocator; +import com.sun.star.uno.XInterface; +import com.sun.star.xml.sax.InputSource; import com.sun.star.xml.sax.XAttributeList; -import com.sun.star.xml.sax.XParser ; -import com.sun.star.xml.sax.InputSource ; -import com.sun.star.lang.XComponent; -import com.sun.star.document.XExporter; -import com.sun.star.document.XImporter; -import com.sun.star.document.XFilter; +import com.sun.star.xml.sax.XDocumentHandler; +import com.sun.star.xml.sax.XLocator; +import com.sun.star.xml.sax.XParser; public class XMLTools { @@ -59,7 +59,7 @@ public class XMLTools { public String Value ; } private Hashtable attrByName = new Hashtable() ; - private Vector attributes = new Vector() ; + private ArrayList attributes = new ArrayList() ; private PrintWriter log = null ; /** @@ -255,7 +255,7 @@ public class XMLTools { public static class XMLWellFormChecker extends XMLWriter { protected boolean docStarted = false ; protected boolean docEnded = false ; - protected Vector tagStack = new Vector() ; + protected ArrayList tagStack = new ArrayList() ; protected boolean wellFormed = true ; protected boolean noOtherErrors = true ; protected PrintWriter log = null ; @@ -279,7 +279,7 @@ public class XMLTools { public void reset() { docStarted = false ; docEnded = false ; - tagStack = new Vector() ; + tagStack = new ArrayList() ; wellFormed = true ; noOtherErrors = true ; PrintWriter log = null ; @@ -320,7 +320,7 @@ public class XMLTools { wellFormed = false ; printError("No tags to close (bad closing tag </" + name + ">)") ; } else { - String startTag = (String) tagStack.elementAt(0) ; + String startTag = (String) tagStack.get(0) ; tagStack.remove(0) ; if (!startTag.equals(name)) { wellFormed = false ; @@ -355,7 +355,7 @@ public class XMLTools { if (printXMLData) return ; log.println(" Tag trace :") ; for (int i = 0; i < tagStack.size(); i++) { - String tag = (String) tagStack.elementAt(i) ; + String tag = (String) tagStack.get(i) ; log.println(" <" + tag + ">") ; } } @@ -411,7 +411,7 @@ public class XMLTools { if (!outerTag.equals("")) { boolean isInTag = false ; for (int i = 0; i < tagStack.size(); i++) { - if (outerTag.equals((String) tagStack.elementAt(i))) { + if (outerTag.equals((String) tagStack.get(i))) { isInTag = true ; break ; } @@ -434,7 +434,7 @@ public class XMLTools { if (!outerTag.equals("")) { boolean isInTag = false ; for (int i = 0; i < tagStack.size(); i++) { - if (outerTag.equals((String) tagStack.elementAt(i))) { + if (outerTag.equals((String) tagStack.get(i))) { isInTag = true ; break ; } @@ -623,10 +623,10 @@ public class XMLTools { */ public static class XMLChecker extends XMLWellFormChecker { protected HashSet tagSet = new HashSet() ; - protected Vector tags = new Vector() ; - protected Vector chars = new Vector() ; - protected Vector tagStack = new Vector() ; - protected Vector attrStack = new Vector() ; + protected ArrayList tags = new ArrayList() ; + protected ArrayList chars = new ArrayList() ; + protected ArrayList tagStack = new ArrayList() ; + protected ArrayList attrStack = new ArrayList() ; public XMLChecker(PrintWriter log, boolean writeXML) { super(log, writeXML) ; @@ -656,15 +656,15 @@ public class XMLTools { if (tagSet.contains(name)) { for (int i = 0; i < tags.size(); i++) { - Tag[] tag = (Tag[]) tags.elementAt(i); + Tag[] tag = (Tag[]) tags.get(i); if (tag[0].isMatchTo(name, attr)) { if (tag[1] == null) { tags.remove(i--); } else { boolean isInStack = false ; for (int j = 0; j < tagStack.size(); j++) { - if (tag[1].isMatchTo((String) tagStack.elementAt(j), - (XAttributeList) attrStack.elementAt(j))) { + if (tag[1].isMatchTo((String) tagStack.get(j), + (XAttributeList) attrStack.get(j))) { isInStack = true ; break ; @@ -688,15 +688,15 @@ public class XMLTools { public void characters(String ch) { super.characters(ch) ; for (int i = 0; i < chars.size(); i++) { - Object[] chr = (Object[]) chars.elementAt(i); + Object[] chr = (Object[]) chars.get(i); if (((String) chr[0]).equals(ch)) { if (chr[1] == null) { chars.remove(i--); } else { boolean isInStack = false ; for (int j = 0; j < tagStack.size(); j++) { - if (((Tag) chr[1]).isMatchTo((String) tagStack.elementAt(j), - (XAttributeList) attrStack.elementAt(j))) { + if (((Tag) chr[1]).isMatchTo((String) tagStack.get(j), + (XAttributeList) attrStack.get(j))) { isInStack = true ; break ; @@ -727,7 +727,7 @@ public class XMLTools { if (tags.size()> 0) { log.println("!!! Error: Some tags were not found :") ; for (int i = 0; i < tags.size(); i++) { - Tag[] tag = (Tag[]) tags.elementAt(i) ; + Tag[] tag = (Tag[]) tags.get(i) ; log.println(" Tag " + tag[0] + " was not found"); if (tag[1] != null) log.println(" inside tag " + tag[1]) ; @@ -736,7 +736,7 @@ public class XMLTools { if (chars.size() > 0) { log.println("!!! Error: Some character data blocks were not found :") ; for (int i = 0; i < chars.size(); i++) { - Object[] ch = (Object[]) chars.elementAt(i) ; + Object[] ch = (Object[]) chars.get(i) ; log.println(" Character data \"" + ch[0] + "\" was not found ") ; if (ch[1] != null) log.println(" inside tag " + ch[1]) ; diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleComponent.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleComponent.java index b08d59e4911e..aa7753836029 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleComponent.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleComponent.java @@ -17,6 +17,7 @@ */ package ifc.accessibility; +import java.util.ArrayList; import java.util.Vector; import lib.MultiMethodTest; @@ -50,7 +51,7 @@ public class _XAccessibleComponent extends MultiMethodTest { public XAccessibleComponent oObj = null; private Rectangle bounds = null; - private Vector KnownBounds = new Vector(); + private ArrayList KnownBounds = new ArrayList(); /** @@ -534,7 +535,7 @@ public class _XAccessibleComponent extends MultiMethodTest { cnt = 50; } - Vector childComp = new Vector(); + ArrayList childComp = new ArrayList(); for (int i = 0; i < cnt; i++) { try { diff --git a/qadevOOo/tests/java/ifc/beans/_XFastPropertySet.java b/qadevOOo/tests/java/ifc/beans/_XFastPropertySet.java index e6931d471fc0..75d751643f3d 100644 --- a/qadevOOo/tests/java/ifc/beans/_XFastPropertySet.java +++ b/qadevOOo/tests/java/ifc/beans/_XFastPropertySet.java @@ -18,9 +18,10 @@ package ifc.beans; +import java.util.ArrayList; +import java.util.List; import java.util.Random; import java.util.Set; -import java.util.Vector; import lib.MultiMethodTest; import lib.StatusException; @@ -54,7 +55,7 @@ import com.sun.star.uno.UnoRuntime; public class _XFastPropertySet extends MultiMethodTest { public XFastPropertySet oObj = null; - private Vector handles = new Vector(); + private List handles = new ArrayList(); private int handle = -1; private Set exclude = null ; @@ -176,7 +177,7 @@ public class _XFastPropertySet extends MultiMethodTest { Random rnd = new Random(); int nr = rnd.nextInt(handles.size()); - handle = ((Integer)handles.elementAt(nr)).intValue(); + handle = ((Integer)handles.get(nr)).intValue(); } private boolean isChangeable(int handle) { diff --git a/qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java b/qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java index 45ef2ebf832b..27cc0ae55e0a 100644 --- a/qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java +++ b/qadevOOo/tests/java/ifc/i18n/_XBreakIterator.java @@ -18,7 +18,7 @@ package ifc.i18n; -import java.util.Vector; +import java.util.ArrayList; import lib.MultiMethodTest; import lib.Status; @@ -170,7 +170,7 @@ public class _XBreakIterator extends MultiMethodTest { tRes.tested("previousCharacters()", bRes); } - Vector vBounds = new Vector(); + ArrayList vBounds = new ArrayList(); /** * Saves bounds of all returned words for the future tests. <p> @@ -205,7 +205,7 @@ public class _XBreakIterator extends MultiMethodTest { requiredMethod("nextWord()"); int i = UnicodeString.length() - 1; - Vector vPrevBounds = new Vector(); + ArrayList vPrevBounds = new ArrayList(); while( i > 0 ) { Boundary bounds = oObj.previousWord(UnicodeString, i, locale, wordType); @@ -343,7 +343,7 @@ public class _XBreakIterator extends MultiMethodTest { tRes.tested("isEndWord()", bRes); } - Vector vSentenceStart = new Vector(); + ArrayList vSentenceStart = new ArrayList(); /** * Tries to find all sentences starting positions passing every character * as position parameter and stores them. Then tries to pass invalid @@ -549,8 +549,8 @@ public class _XBreakIterator extends MultiMethodTest { return cType; } - Vector vCharBlockBounds = new Vector(); - Vector vCharBlockTypes = new Vector(); + ArrayList vCharBlockBounds = new ArrayList(); + ArrayList vCharBlockTypes = new ArrayList(); /** * Creates array of all char blocks with their boundaries and diff --git a/qadevOOo/tests/java/ifc/io/_XDataInputStream.java b/qadevOOo/tests/java/ifc/io/_XDataInputStream.java index defa0b798b97..c59fe46493f1 100644 --- a/qadevOOo/tests/java/ifc/io/_XDataInputStream.java +++ b/qadevOOo/tests/java/ifc/io/_XDataInputStream.java @@ -18,7 +18,7 @@ package ifc.io; -import java.util.Vector; +import java.util.List; import lib.MultiMethodTest; import lib.Status; @@ -81,7 +81,7 @@ public class _XDataInputStream extends MultiMethodTest { XInterface x = (XInterface)tEnv.getObjRelation("StreamWriter") ; oStream = (XDataOutputStream)UnoRuntime.queryInterface( XDataOutputStream.class, x); - Vector data = (Vector) tEnv.getObjRelation("StreamData") ; + List data = (List) tEnv.getObjRelation("StreamData") ; if (data == null || oStream == null) { throw new StatusException(Status.failed("Object relation not found.")); } diff --git a/qadevOOo/tests/java/ifc/io/_XDataOutputStream.java b/qadevOOo/tests/java/ifc/io/_XDataOutputStream.java index edb2cef046f6..293c872d43e0 100644 --- a/qadevOOo/tests/java/ifc/io/_XDataOutputStream.java +++ b/qadevOOo/tests/java/ifc/io/_XDataOutputStream.java @@ -18,7 +18,7 @@ package ifc.io; -import java.util.Vector; +import java.util.List; import lib.MultiMethodTest; @@ -70,7 +70,7 @@ public class _XDataOutputStream extends MultiMethodTest { */ public void before() throws RuntimeException { - Vector data = (Vector) tEnv.getObjRelation("StreamData") ; + List data = (List) tEnv.getObjRelation("StreamData") ; if (data == null) { throw new RuntimeException("Object relation 'StreamData' not found."); } diff --git a/qadevOOo/tests/java/ifc/sdbc/_XParameters.java b/qadevOOo/tests/java/ifc/sdbc/_XParameters.java index e4366f3d8337..06b50e2ccb38 100644 --- a/qadevOOo/tests/java/ifc/sdbc/_XParameters.java +++ b/qadevOOo/tests/java/ifc/sdbc/_XParameters.java @@ -18,7 +18,7 @@ package ifc.sdbc; -import java.util.Vector; +import java.util.List; import lib.MultiMethodTest; import lib.Status; @@ -95,13 +95,13 @@ public class _XParameters extends MultiMethodTest { // oObj filled by MultiMethodTest public XParameters oObj = null ; - private Vector data = null ; + private List data = null ; /** * Gets object relation */ public void before() { - data = (Vector) tEnv.getObjRelation("XParameters.ParamValues") ; + data = (List) tEnv.getObjRelation("XParameters.ParamValues") ; if (data == null) { log.println("!!! Relation not found !!!") ; } diff --git a/qadevOOo/tests/java/ifc/sdbc/_XRow.java b/qadevOOo/tests/java/ifc/sdbc/_XRow.java index 3fe8dc1d3ae0..12f4f22fca55 100644 --- a/qadevOOo/tests/java/ifc/sdbc/_XRow.java +++ b/qadevOOo/tests/java/ifc/sdbc/_XRow.java @@ -18,7 +18,7 @@ package ifc.sdbc; -import java.util.Vector; +import java.util.List; import lib.MultiMethodTest; @@ -95,14 +95,14 @@ public class _XRow extends MultiMethodTest { // oObj filled by MultiMethodTest public XRow oObj = null ; - private Vector data = null ; + private List data = null ; private boolean notNullRes = true ; /** * Retrieves object relation first. */ public void before() { - data = (Vector) tEnv.getObjRelation("CurrentRowData") ; + data = (List) tEnv.getObjRelation("CurrentRowData") ; } /** diff --git a/qadevOOo/tests/java/ifc/sdbc/_XRowUpdate.java b/qadevOOo/tests/java/ifc/sdbc/_XRowUpdate.java index a70f0154b5ff..b08cd9256ebb 100644 --- a/qadevOOo/tests/java/ifc/sdbc/_XRowUpdate.java +++ b/qadevOOo/tests/java/ifc/sdbc/_XRowUpdate.java @@ -18,7 +18,7 @@ package ifc.sdbc; -import java.util.Vector; +import java.util.List; import lib.MultiMethodTest; import lib.Status; @@ -93,14 +93,14 @@ public class _XRowUpdate extends MultiMethodTest { // oObj filled by MultiMethodTest public XRowUpdate oObj = null ; - private Vector rowData = null ; + private List rowData = null ; private XRow row = null ; /** * Gets relations. */ public void before() { - rowData = (Vector) tEnv.getObjRelation("CurrentRowData") ; + rowData = (List) tEnv.getObjRelation("CurrentRowData") ; if (rowData == null) { log.println("!!! 'CurrentRowData' relation not found !!!") ; } diff --git a/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java b/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java index dfb07a353876..e75b1b15d5df 100644 --- a/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java +++ b/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java @@ -18,7 +18,10 @@ package mod._dbaccess; +import ifc.sdb._XCompletedExecution; + import java.io.PrintWriter; +import java.util.ArrayList; import java.util.Vector; import lib.Status; @@ -28,15 +31,21 @@ import lib.TestEnvironment; import lib.TestParameters; import util.DBTools; import util.utils; +import util.db.DataSource; +import util.db.DataSourceDescriptor; import com.sun.star.beans.PropertyValue; import com.sun.star.beans.XPropertySet; +import com.sun.star.frame.XModel; import com.sun.star.lang.XComponent; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.sdb.CommandType; import com.sun.star.sdb.ParametersRequest; +import com.sun.star.sdb.RowChangeEvent; import com.sun.star.sdb.XInteractionSupplyParameters; +import com.sun.star.sdbc.SQLException; import com.sun.star.sdbc.XConnection; +import com.sun.star.sdbc.XParameters; import com.sun.star.sdbc.XResultSet; import com.sun.star.sdbc.XResultSetUpdate; import com.sun.star.sdbc.XRow; @@ -49,13 +58,6 @@ import com.sun.star.ucb.AuthenticationRequest; import com.sun.star.uno.UnoRuntime; import com.sun.star.uno.XInterface; import com.sun.star.util.XCloseable; -import com.sun.star.frame.XModel; -import com.sun.star.sdb.RowChangeEvent; -import com.sun.star.sdbc.SQLException; -import com.sun.star.sdbc.XParameters; -import ifc.sdb._XCompletedExecution; -import util.db.DataSource; -import util.db.DataSourceDescriptor; /** * Test for object which is represented by service @@ -380,7 +382,7 @@ public class ORowSet extends TestCase { // Adding relations for XRow as a Vector with all data // of current row of RowSet. - Vector rowData = new Vector(); + ArrayList rowData = new ArrayList(); for (int i = 0; i < DBTools.TST_TABLE_VALUES[0].length; i++) { rowData.add(DBTools.TST_TABLE_VALUES[0][i]); @@ -413,7 +415,7 @@ public class ORowSet extends TestCase { } // Adding relation for XParameters ifc test - tEnv.addObjRelation( "XParameters.ParamValues", new Vector() ); + tEnv.addObjRelation( "XParameters.ParamValues", new ArrayList() ); // Adding relation for XRowUpdate final XRow row = UnoRuntime.queryInterface( XRow.class, m_rowSet ); diff --git a/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java b/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java index df55740ed4a6..d9424522eb08 100644 --- a/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java +++ b/qadevOOo/tests/java/mod/_forms/ODatabaseForm.java @@ -17,7 +17,11 @@ */ package mod._forms; +import ifc.form._XDatabaseParameterBroadcaster; +import ifc.sdb._XCompletedExecution; + import java.io.PrintWriter; +import java.util.ArrayList; import java.util.Vector; import lib.Status; @@ -68,8 +72,6 @@ import com.sun.star.util.DateTime; import com.sun.star.util.Time; import com.sun.star.util.XCloseable; import com.sun.star.view.XControlAccess; -import ifc.form._XDatabaseParameterBroadcaster; -import ifc.sdb._XCompletedExecution; /** @@ -620,7 +622,7 @@ public class ODatabaseForm extends TestCase { tEnv.addObjRelation("XColumnLocate.ColumnName", DBTools.TST_STRING_F); // Adding relation for XParameters ifc test - Vector params = new Vector(); + ArrayList params = new ArrayList(); /***** statement parameter types and their initial @@ -710,7 +712,7 @@ public class ODatabaseForm extends TestCase { // Adding relations for XRow as a Vector with all data // of current row of RowSet. - Vector rowData = new Vector(); + ArrayList rowData = new ArrayList(); for (int i = 0; i < DBTools.TST_TABLE_VALUES[0].length; i++) { rowData.add(DBTools.TST_TABLE_VALUES[0][i]); diff --git a/qadevOOo/tests/java/mod/_fwl/FilterFactory.java b/qadevOOo/tests/java/mod/_fwl/FilterFactory.java index b0c8fab1048d..1e8bae332788 100644 --- a/qadevOOo/tests/java/mod/_fwl/FilterFactory.java +++ b/qadevOOo/tests/java/mod/_fwl/FilterFactory.java @@ -18,9 +18,8 @@ package mod._fwl; -import com.sun.star.beans.NamedValue; import java.io.PrintWriter; -import java.util.Vector; +import java.util.ArrayList; import lib.Status; import lib.StatusException; @@ -29,6 +28,7 @@ import lib.TestEnvironment; import lib.TestParameters; import util.utils; +import com.sun.star.beans.NamedValue; import com.sun.star.beans.PropertyValue; import com.sun.star.container.XNameAccess; import com.sun.star.lang.XMultiServiceFactory; @@ -119,8 +119,8 @@ public class FilterFactory extends TestCase { // XMSF - Vector vFTypes = new Vector(); - Vector vFArgs = new Vector(); + ArrayList vFTypes = new ArrayList(); + ArrayList vFArgs = new ArrayList(); for (int i = 0; i < filterNames.length; i++) { PropertyValue[] filterProps = null; try { diff --git a/qadevOOo/tests/java/mod/_sc/ScStyleObj.java b/qadevOOo/tests/java/mod/_sc/ScStyleObj.java index 5450b43fed14..2b929a966925 100644 --- a/qadevOOo/tests/java/mod/_sc/ScStyleObj.java +++ b/qadevOOo/tests/java/mod/_sc/ScStyleObj.java @@ -19,7 +19,7 @@ package mod._sc; import java.io.PrintWriter; -import java.util.Vector; +import java.util.ArrayList; import lib.StatusException; import lib.TestCase; @@ -247,7 +247,7 @@ public class ScStyleObj extends TestCase { public String[] getPropertyNames(XPropertySet props) { Property[] the_props = props.getPropertySetInfo().getProperties(); - Vector names = new Vector() ; + ArrayList names = new ArrayList() ; for (int i=0;i<the_props.length;i++) { boolean isWritable = diff --git a/qadevOOo/tests/java/mod/_stm/DataInputStream.java b/qadevOOo/tests/java/mod/_stm/DataInputStream.java index 5cb5bec9b6ed..3affe2fd325a 100644 --- a/qadevOOo/tests/java/mod/_stm/DataInputStream.java +++ b/qadevOOo/tests/java/mod/_stm/DataInputStream.java @@ -19,7 +19,7 @@ package mod._stm; import java.io.PrintWriter; -import java.util.Vector; +import java.util.ArrayList; import lib.StatusException; import lib.TestCase; @@ -131,7 +131,7 @@ public class DataInputStream extends TestCase { xDataSink.setInputStream(xPipeInput) ; // all data types for writing to an XDataInputStream - Vector data = new Vector() ; + ArrayList data = new ArrayList() ; data.add(new Boolean(true)) ; data.add(new Byte((byte)123)) ; data.add(new Character((char)1234)) ; diff --git a/qadevOOo/tests/java/mod/_stm/DataOutputStream.java b/qadevOOo/tests/java/mod/_stm/DataOutputStream.java index c2b1f5ef903a..df8007d06ab8 100644 --- a/qadevOOo/tests/java/mod/_stm/DataOutputStream.java +++ b/qadevOOo/tests/java/mod/_stm/DataOutputStream.java @@ -19,7 +19,7 @@ package mod._stm; import java.io.PrintWriter; -import java.util.Vector; +import java.util.ArrayList; import lib.StatusException; import lib.TestCase; @@ -105,7 +105,7 @@ public class DataOutputStream extends TestCase { xDataSource.setOutputStream(xPipeOutput); // all data types for writing to an XDataInputStream - Vector data = new Vector() ; + ArrayList data = new ArrayList() ; data.add(new Boolean(true)) ; data.add(new Byte((byte)123)) ; data.add(new Character((char)1234)) ; diff --git a/qadevOOo/tests/java/mod/_stm/MarkableOutputStream.java b/qadevOOo/tests/java/mod/_stm/MarkableOutputStream.java index c97103d44cdf..eb9b398cf934 100644 --- a/qadevOOo/tests/java/mod/_stm/MarkableOutputStream.java +++ b/qadevOOo/tests/java/mod/_stm/MarkableOutputStream.java @@ -19,7 +19,7 @@ package mod._stm; import java.io.PrintWriter; -import java.util.Vector; +import java.util.ArrayList; import lib.StatusException; import lib.TestCase; @@ -130,7 +130,7 @@ public class MarkableOutputStream extends TestCase { oObj = (XInterface) mostream; // all data types for writing to an XDataInputStream - Vector data = new Vector() ; + ArrayList data = new ArrayList() ; data.add(new Boolean(true)) ; data.add(new Byte((byte)123)) ; data.add(new Character((char)1234)) ; diff --git a/qadevOOo/tests/java/mod/_stm/ObjectInputStream.java b/qadevOOo/tests/java/mod/_stm/ObjectInputStream.java index 5901a7dd4696..d2a3925818b9 100644 --- a/qadevOOo/tests/java/mod/_stm/ObjectInputStream.java +++ b/qadevOOo/tests/java/mod/_stm/ObjectInputStream.java @@ -19,7 +19,7 @@ package mod._stm; import java.io.PrintWriter; -import java.util.Vector; +import java.util.ArrayList; import lib.StatusException; import lib.TestCase; @@ -250,7 +250,7 @@ public class ObjectInputStream extends TestCase { // all data types for writing to an XDataInputStream - Vector data = new Vector() ; + ArrayList data = new ArrayList() ; data.add(new Boolean(true)) ; data.add(new Byte((byte)123)) ; data.add(new Character((char)1234)) ; diff --git a/qadevOOo/tests/java/mod/_stm/ObjectOutputStream.java b/qadevOOo/tests/java/mod/_stm/ObjectOutputStream.java index e7c2c4aa3484..bccf7540de6b 100644 --- a/qadevOOo/tests/java/mod/_stm/ObjectOutputStream.java +++ b/qadevOOo/tests/java/mod/_stm/ObjectOutputStream.java @@ -19,7 +19,7 @@ package mod._stm; import java.io.PrintWriter; -import java.util.Vector; +import java.util.ArrayList; import lib.StatusException; import lib.TestCase; @@ -240,7 +240,7 @@ public class ObjectOutputStream extends TestCase { oObj = oStream; // all data types for writing to an XDataInputStream - Vector data = new Vector() ; + ArrayList data = new ArrayList() ; data.add(new Boolean(true)) ; data.add(new Byte((byte)123)) ; data.add(new Character((char)1234)) ; diff --git a/qadevOOo/tests/java/mod/_sw/SwXTextCursor.java b/qadevOOo/tests/java/mod/_sw/SwXTextCursor.java index 037a78f6c1f7..2053403a6e5d 100644 --- a/qadevOOo/tests/java/mod/_sw/SwXTextCursor.java +++ b/qadevOOo/tests/java/mod/_sw/SwXTextCursor.java @@ -18,7 +18,7 @@ package mod._sw; import java.io.PrintWriter; -import java.util.Vector; +import java.util.ArrayList; import lib.StatusException; import lib.TestCase; @@ -292,7 +292,7 @@ public class SwXTextCursor extends TestCase { public String[] getPropertyNames(XPropertySet props) { Property[] the_props = props.getPropertySetInfo().getProperties(); - Vector names = new Vector(); + ArrayList names = new ArrayList(); for (int i = 0; i < the_props.length; i++) { boolean isWritable = ((the_props[i].Attributes & PropertyAttribute.READONLY) == 0); |