[Libreoffice-commits] core.git: 6 commits - filter/qa qadevOOo/runner qadevOOo/tests scripting/java
Noel Grandin
noel at peralex.com
Fri Oct 16 03:51:06 PDT 2015
filter/qa/complex/filter/misc/FinalizedMandatoryTest.java | 2 -
filter/qa/complex/filter/misc/TypeDetection6FileFormat.java | 2 -
qadevOOo/runner/helper/FileTools.java | 14 +++++-----
qadevOOo/runner/util/DBTools.java | 5 ---
qadevOOo/runner/util/db/DataSource.java | 2 -
qadevOOo/runner/util/db/DataSourceDescriptor.java | 4 --
qadevOOo/tests/java/ifc/sheet/_XScenario.java | 3 --
qadevOOo/tests/java/mod/_dbaccess/ORowSet.java | 2 -
scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java | 14 +++++-----
9 files changed, 20 insertions(+), 28 deletions(-)
New commits:
commit 1d3fc27b0f457d1c9b0106943c15f3e0c9ac6541
Author: Noel Grandin <noel at peralex.com>
Date: Fri Oct 16 12:46:11 2015 +0200
spelling
Change-Id: Ibd062310a3ae597cbab98729b394b26838e71d67
diff --git a/filter/qa/complex/filter/misc/FinalizedMandatoryTest.java b/filter/qa/complex/filter/misc/FinalizedMandatoryTest.java
index 1fed782..b3b618c 100644
--- a/filter/qa/complex/filter/misc/FinalizedMandatoryTest.java
+++ b/filter/qa/complex/filter/misc/FinalizedMandatoryTest.java
@@ -89,7 +89,7 @@ public class FinalizedMandatoryTest
/**
* Creates an instance for the given <CODE>serviceName</CODE>
* @param serviceName the name of the service which should be created
- * @throws Exception was thrown if creataion failes
+ * @throws Exception was thrown if creation fails
* @return <CODE>XInterface</CODE> of service
*/
private XInterface getTestObject(String serviceName) throws Exception
diff --git a/filter/qa/complex/filter/misc/TypeDetection6FileFormat.java b/filter/qa/complex/filter/misc/TypeDetection6FileFormat.java
index c5e342b..009fd52 100644
--- a/filter/qa/complex/filter/misc/TypeDetection6FileFormat.java
+++ b/filter/qa/complex/filter/misc/TypeDetection6FileFormat.java
@@ -88,7 +88,7 @@ public class TypeDetection6FileFormat
/**
* Creates an instance for the given <CODE>serviceName</CODE>
* @param serviceName the name of the service which should be created
- * @throws Exception was thrown if creataion failes
+ * @throws Exception was thrown if creation fails
* @return <CODE>XInterface</CODE> of service
*/
public XInterface getTestObject(String serviceName) throws Exception
commit 6f69781df0a1bc5809bf8acad84e2bab01429ce9
Author: Noel Grandin <noel at peralex.com>
Date: Fri Oct 16 12:43:57 2015 +0200
cid#1326952 RV: Bad use of return value
Change-Id: I93794f661d28b982baf0dbba1ddc9b07d6ce81ff
diff --git a/qadevOOo/runner/helper/FileTools.java b/qadevOOo/runner/helper/FileTools.java
index 4bcee70..f8708e5 100644
--- a/qadevOOo/runner/helper/FileTools.java
+++ b/qadevOOo/runner/helper/FileTools.java
@@ -33,8 +33,8 @@ public class FileTools {
* Copies all files under srcDir to dstDir.
* If dstDir does not exist, it will be created.
* @param srcDir the source directory
- * @param dstDir the destination direcotry
- * @throws java.io.IOException throws java.io.IOException if something failes
+ * @param dstDir the destination directory
+ * @throws java.io.IOException throws java.io.IOException if something fails
*/
public static void copyDirectory(File srcDir, File dstDir)
throws java.io.IOException {
@@ -45,9 +45,9 @@ public class FileTools {
* ignore list. This files will not be copied.
* If dstDir does not exist, it will be created.
* @param srcDir the source directory
- * @param dstDir the destination direcotry
+ * @param dstDir the destination directory
* @param ignore a list of files which should not be copied
- * @throws java.io.IOException throws java.io.IOException if something failes
+ * @throws java.io.IOException throws java.io.IOException if something fails
*/
public static void copyDirectory(File srcDir, File dstDir, String[] ignore)
throws java.io.IOException {
@@ -60,7 +60,9 @@ public class FileTools {
if (srcDir.isDirectory()) {
if (!dstDir.exists()) {
- dstDir.mkdir();
+ if (!dstDir.mkdir()) {
+ throw new java.io.IOException("could not create folder " + dstDir);
+ }
}
String[] files = srcDir.list();
@@ -77,7 +79,7 @@ public class FileTools {
* Copies src file to dst file. If the dst file does not exist, it is created
* @param src the source file
* @param dst the destination file
- * @throws java.io.IOException throws java.io.IOException if something failes
+ * @throws java.io.IOException throws java.io.IOException if something fails
*/
public static void copyFile(File src, File dst) throws java.io.IOException {
InputStream in = null;
commit a2fa0ded8acb4e6c6e48f40b8ebe99aafe0f9899
Author: Noel Grandin <noel at peralex.com>
Date: Fri Oct 16 11:52:41 2015 +0200
cid#1326721 to cid#1326726 Dm: Dubious method used
Change-Id: I98e5590f61434ed1b1081b5b592622f9bcf037ec
diff --git a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java
index deef40e..d63eb84 100644
--- a/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java
+++ b/scripting/java/com/sun/star/script/framework/provider/beanshell/ScriptEditorForBeanShell.java
@@ -59,9 +59,9 @@ public class ScriptEditorForBeanShell implements ScriptEditor, ActionListener {
// global ScriptEditorForBeanShell returned for getEditor() calls
private static ScriptEditorForBeanShell theScriptEditorForBeanShell;
- // global list of ScriptEditors, key is URL of file being edited
- private static Map<URL, ScriptEditorForBeanShell> BEING_EDITED =
- new HashMap<URL, ScriptEditorForBeanShell>();
+ // global list of ScriptEditors, key is [external form of URL] of file being edited
+ private static Map<String, ScriptEditorForBeanShell> BEING_EDITED =
+ new HashMap<String, ScriptEditorForBeanShell>();
// template for new BeanShell scripts
private static String BSHTEMPLATE;
@@ -112,7 +112,7 @@ public class ScriptEditorForBeanShell implements ScriptEditor, ActionListener {
*/
public static ScriptEditorForBeanShell getEditor(URL url) {
synchronized (BEING_EDITED) {
- return BEING_EDITED.get(url);
+ return BEING_EDITED.get(url.toExternalForm());
}
}
@@ -194,12 +194,12 @@ public class ScriptEditorForBeanShell implements ScriptEditor, ActionListener {
ScriptEditorForBeanShell editor;
synchronized (BEING_EDITED) {
- editor = BEING_EDITED.get(url);
+ editor = BEING_EDITED.get(url.toExternalForm());
if (editor == null) {
editor = new ScriptEditorForBeanShell(
context, theCl, url);
- BEING_EDITED.put(url, editor);
+ BEING_EDITED.put(url.toExternalForm(), editor);
}
}
@@ -353,7 +353,7 @@ public class ScriptEditorForBeanShell implements ScriptEditor, ActionListener {
private void shutdown() {
synchronized (BEING_EDITED) {
- BEING_EDITED.remove(scriptURL);
+ BEING_EDITED.remove(scriptURL.toExternalForm());
}
}
commit 84ec34e08e87da58a995006d4b1c9d298a438485
Author: Noel Grandin <noel at peralex.com>
Date: Fri Oct 16 11:44:12 2015 +0200
cid#1327207 UwF: Unwritten field
Change-Id: Ied3798a1643c0fa2ca86c9d76fef2dcc270f5b2d
diff --git a/qadevOOo/runner/util/DBTools.java b/qadevOOo/runner/util/DBTools.java
index 589f714b..69a460b 100644
--- a/qadevOOo/runner/util/DBTools.java
+++ b/qadevOOo/runner/util/DBTools.java
@@ -114,10 +114,6 @@ public class DBTools {
*/
public Boolean IsPasswordRequired = null ;
/**
- * Representation of <code>'SuppressVersionColumns'</code> property.
- */
- private Boolean SuppressVersionColumns;
- /**
* Representation of <code>'IsReadOnly'</code> property.
*/
private Boolean IsReadOnly = null ;
@@ -152,7 +148,6 @@ public class DBTools {
if (User != null) props.setPropertyValue("User", User) ;
if (Password != null) props.setPropertyValue("Password", Password) ;
if (IsPasswordRequired != null) props.setPropertyValue("IsPasswordRequired", IsPasswordRequired) ;
- if (SuppressVersionColumns != null) props.setPropertyValue("SuppressVersionColumns", SuppressVersionColumns) ;
if (IsReadOnly != null) props.setPropertyValue("IsReadOnly", IsReadOnly) ;
if (TableFilter != null) props.setPropertyValue("TableFilter", TableFilter) ;
commit c5989fb39bdf303773d3d1a8230b2a836b060a4d
Author: Noel Grandin <noel at peralex.com>
Date: Fri Oct 16 11:43:19 2015 +0200
cid#1327206 UwF: Unwritten field
Change-Id: I631bff9271f4e82a656ba25365abfc3189676026
diff --git a/qadevOOo/tests/java/ifc/sheet/_XScenario.java b/qadevOOo/tests/java/ifc/sheet/_XScenario.java
index 4860a7a..4d58f1e 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XScenario.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XScenario.java
@@ -27,7 +27,6 @@ import lib.Status;
*/
public class _XScenario extends MultiMethodTest {
public XScenario oObj = null;
- CellRangeAddress address = null;
String comment = null;
boolean skipTest = false;
@@ -43,7 +42,7 @@ public class _XScenario extends MultiMethodTest {
tRes.tested("addRanges()",Status.skipped(true));
return;
}
- oObj.addRanges(new CellRangeAddress[] {address});
+ oObj.addRanges(new CellRangeAddress[] {null});
tRes.tested("addRanges()", true);
}
commit e8221763fb53c89c630b827eb78d9ae6a022ee97
Author: Noel Grandin <noel at peralex.com>
Date: Fri Oct 16 11:42:12 2015 +0200
cid#1327204 UwF: Unwritten field
Change-Id: I9606abbbf92c052a1265957cbb4e2d73070540c5
diff --git a/qadevOOo/runner/util/db/DataSource.java b/qadevOOo/runner/util/db/DataSource.java
index 0918ba1..9b1ac80 100644
--- a/qadevOOo/runner/util/db/DataSource.java
+++ b/qadevOOo/runner/util/db/DataSource.java
@@ -42,7 +42,7 @@ public class DataSource
m_dataSource );
Object[] descriptorProperties = new Object[] {
- _descriptor.Name, _descriptor.URL, _descriptor.Info, _descriptor.User, _descriptor.Password,
+ null, _descriptor.URL, _descriptor.Info, _descriptor.User, _descriptor.Password,
_descriptor.IsPasswordRequired };
String[] propertyNames = new String[] {
"Name", "URL", "Info", "User", "Password", "IsPasswordRequired" };
diff --git a/qadevOOo/runner/util/db/DataSourceDescriptor.java b/qadevOOo/runner/util/db/DataSourceDescriptor.java
index f4de986..6b69944 100644
--- a/qadevOOo/runner/util/db/DataSourceDescriptor.java
+++ b/qadevOOo/runner/util/db/DataSourceDescriptor.java
@@ -26,10 +26,6 @@ import com.sun.star.lang.XMultiServiceFactory;
public class DataSourceDescriptor
{
/**
- * Representation of <code>'Name'</code> property.
- */
- public String Name = null ;
- /**
* Representation of <code>'URL'</code> property.
*/
public String URL = null ;
diff --git a/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java b/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java
index 2cb340e..a22333bb 100644
--- a/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java
+++ b/qadevOOo/tests/java/mod/_dbaccess/ORowSet.java
@@ -251,7 +251,7 @@ public class ORowSet extends TestCase {
if (isMySQLDB)
{
DBTools.DataSourceInfo legacyDescriptor = dbTools.newDataSourceInfo();
- legacyDescriptor.Name = srcInf.Name;
+ legacyDescriptor.Name = null;
legacyDescriptor.User = srcInf.User;
legacyDescriptor.Password = srcInf.Password;
legacyDescriptor.Info = srcInf.Info;
More information about the Libreoffice-commits
mailing list