[Libreoffice-commits] core.git: 4 commits - qadevOOo/tests sc/qa scripting/java sfx2/qa swext/mediawiki wizards/com

Noel Grandin noel at peralex.com
Wed Oct 14 07:08:16 PDT 2015


 qadevOOo/tests/java/ifc/beans/_XPropertySet.java                                                |    2 -
 qadevOOo/tests/java/ifc/util/_XCloneable.java                                                   |    5 ++-
 sc/qa/complex/sc/CalcRTL.java                                                                   |    3 --
 scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java |   14 +++++-----
 sfx2/qa/complex/sfx2/DocumentMetadataAccess.java                                                |    2 -
 swext/mediawiki/src/com/sun/star/wiki/WikiProtocolSocketFactory.java                            |    1 
 wizards/com/sun/star/wizards/report/ReportWizard.java                                           |    1 
 wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java                                       |    1 
 8 files changed, 10 insertions(+), 19 deletions(-)

New commits:
commit 3cc4b81b76a1f6a876bd9af7b99359b21652b439
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Oct 14 16:01:23 2015 +0200

    java:using "this" with a static field makes no sense
    
    Change-Id: I79a38ff2ec50d3a3687cac7ed7688bbbcaf2208c

diff --git a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java
index 0f83d3f..c0c6905 100644
--- a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java
+++ b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptEditorForJavaScript.java
@@ -195,7 +195,7 @@ public class ScriptEditorForJavaScript implements ScriptEditor {
     private ScriptEditorForJavaScript(XScriptContext context, URL url) {
         initUI();
         Scriptable scope = getScope(context);
-        this.rhinoWindow.openFile(url, scope, new closeHandler(url));
+        rhinoWindow.openFile(url, scope, new closeHandler(url));
         this.scriptURL = url;
     }
 
@@ -207,7 +207,7 @@ public class ScriptEditorForJavaScript implements ScriptEditor {
     public Object execute() throws Exception {
         rhinoWindow.toFront();
 
-        return this.rhinoWindow.runScriptWindow(scriptURL);
+        return rhinoWindow.runScriptWindow(scriptURL);
     }
 
     /**
@@ -215,15 +215,15 @@ public class ScriptEditorForJavaScript implements ScriptEditor {
      *
      */
     public void indicateErrorLine(int lineNum) {
-        this.rhinoWindow.toFront();
-        this.rhinoWindow.highlighLineInScriptWindow(scriptURL, lineNum);
+        rhinoWindow.toFront();
+        rhinoWindow.highlighLineInScriptWindow(scriptURL, lineNum);
     }
     // This code is based on the main method of the Rhino Debugger Main class
     // We pass in the XScriptContext in the global scope for script execution
     private void initUI() {
         try {
             synchronized (ScriptEditorForJavaScript.class) {
-                if (this.rhinoWindow != null) {
+                if (rhinoWindow != null) {
                     return;
                 }
 
@@ -250,7 +250,7 @@ public class ScriptEditorForJavaScript implements ScriptEditor {
                         shutdown();
                     }
                 });
-                this.rhinoWindow = sdb;
+                rhinoWindow = sdb;
             }
         } catch (Exception exc) {
             LogUtils.DEBUG(LogUtils.getTrace(exc));
@@ -259,7 +259,7 @@ public class ScriptEditorForJavaScript implements ScriptEditor {
 
     private void shutdown() {
         // dereference Rhino Debugger window
-        this.rhinoWindow = null;
+        rhinoWindow = null;
         this.scriptURL = null;
 
         // remove all scripts from BEING_EDITED
commit ee3ebedbae54e80dfac53ed946153a6203a5331b
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Oct 14 16:00:37 2015 +0200

    java:remove unused imports
    
    Change-Id: I9529bf81dcfcd6761485af5d66789c1a9a83eeec

diff --git a/sc/qa/complex/sc/CalcRTL.java b/sc/qa/complex/sc/CalcRTL.java
index 7ca5be6..d7a1f61 100644
--- a/sc/qa/complex/sc/CalcRTL.java
+++ b/sc/qa/complex/sc/CalcRTL.java
@@ -35,9 +35,6 @@ import com.sun.star.sheet.XCellRangeAddressable;
 import com.sun.star.sheet.XSpreadsheet;
 import com.sun.star.sheet.XSpreadsheetDocument;
 import com.sun.star.sheet.XSpreadsheets;
-import com.sun.star.uno.Any;
-import com.sun.star.uno.AnyConverter;
-import com.sun.star.uno.Type;
 import com.sun.star.uno.UnoRuntime;
 import com.sun.star.util.XCloseable;
 
diff --git a/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java b/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java
index f55f9f9..4c23235 100644
--- a/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java
+++ b/sfx2/qa/complex/sfx2/DocumentMetadataAccess.java
@@ -23,8 +23,6 @@ import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 import helper.StreamSimulator;
 
-import java.io.IOException;
-
 import lib.TestParameters;
 
 import org.junit.After;
diff --git a/swext/mediawiki/src/com/sun/star/wiki/WikiProtocolSocketFactory.java b/swext/mediawiki/src/com/sun/star/wiki/WikiProtocolSocketFactory.java
index 3d2d22da..4ffd06c 100644
--- a/swext/mediawiki/src/com/sun/star/wiki/WikiProtocolSocketFactory.java
+++ b/swext/mediawiki/src/com/sun/star/wiki/WikiProtocolSocketFactory.java
@@ -20,7 +20,6 @@ package com.sun.star.wiki;
 
 import java.io.IOException;
 import java.net.InetAddress;
-import java.net.InetSocketAddress;
 import java.net.Socket;
 import java.net.UnknownHostException;
 import java.security.KeyStore;
diff --git a/wizards/com/sun/star/wizards/report/ReportWizard.java b/wizards/com/sun/star/wizards/report/ReportWizard.java
index 519ea48..d14b46f 100644
--- a/wizards/com/sun/star/wizards/report/ReportWizard.java
+++ b/wizards/com/sun/star/wizards/report/ReportWizard.java
@@ -41,7 +41,6 @@ import com.sun.star.wizards.db.DatabaseObjectWizard;
 import com.sun.star.wizards.db.RecordParser;
 import com.sun.star.wizards.db.SQLQueryComposer;
 import com.sun.star.wizards.ui.CommandFieldSelection;
-import com.sun.star.wizards.ui.FieldSelection;
 import com.sun.star.wizards.ui.SortingComponent;
 import com.sun.star.wizards.ui.TitlesComponent;
 import com.sun.star.wizards.ui.UIConsts;
diff --git a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java
index 64b8114..4f5b2d2 100644
--- a/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java
+++ b/wizards/com/sun/star/wizards/table/PrimaryKeyHandler.java
@@ -30,7 +30,6 @@ import com.sun.star.wizards.common.Helper;
 import com.sun.star.wizards.common.JavaTools;
 import com.sun.star.wizards.common.PropertyNames;
 import com.sun.star.wizards.db.TableDescriptor;
-import com.sun.star.wizards.db.TypeInspector;
 import com.sun.star.wizards.ui.FieldSelection;
 import com.sun.star.wizards.ui.UIConsts;
 import com.sun.star.wizards.ui.UnoDialog;
commit 5ca9d3e67e14519179e52eec50aaa59689b8d432
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Oct 14 15:52:57 2015 +0200

    cid#1326855 EC: Comparing incompatible types for equality
    
    Change-Id: I3f23e25e449e85176a092400d14e7b6fbf78b588

diff --git a/qadevOOo/tests/java/ifc/beans/_XPropertySet.java b/qadevOOo/tests/java/ifc/beans/_XPropertySet.java
index 76aac03..8ef74af 100644
--- a/qadevOOo/tests/java/ifc/beans/_XPropertySet.java
+++ b/qadevOOo/tests/java/ifc/beans/_XPropertySet.java
@@ -549,8 +549,6 @@ public class _XPropertySet extends MultiMethodTest {
 
             if (cont) continue;
 
-            if (name.equals(oObj))
-            log.println("Checking '"+name+"'");
             boolean isWritable = ((property.Attributes &
                 PropertyAttribute.READONLY) == 0);
             boolean isNotNull = ((property.Attributes &
commit f1dfc5690a2b1a24e2d2f707a50c34d7df61dc4d
Author: Noel Grandin <noel at peralex.com>
Date:   Wed Oct 14 15:51:15 2015 +0200

    cid#1326854 EC: Comparing incompatible types for equality
    
    Change-Id: Ifc2b655bdb8dc361dd051be5b8b29fe6dee55ff2

diff --git a/qadevOOo/tests/java/ifc/util/_XCloneable.java b/qadevOOo/tests/java/ifc/util/_XCloneable.java
index 91c253e..c37dcca 100644
--- a/qadevOOo/tests/java/ifc/util/_XCloneable.java
+++ b/qadevOOo/tests/java/ifc/util/_XCloneable.java
@@ -20,6 +20,8 @@ package ifc.util;
 
 import lib.MultiMethodTest;
 
+import java.util.Arrays;
+
 import com.sun.star.lang.XServiceInfo;
 import com.sun.star.lang.XTypeProvider;
 import com.sun.star.uno.UnoRuntime;
@@ -67,8 +69,7 @@ public class _XCloneable extends MultiMethodTest {
     }
 
     protected boolean checkImplementationID(XInterface org, XInterface clone) {
-        boolean res = getImplementationID(org).equals(
-                                            getImplementationID(clone));
+        boolean res = Arrays.equals(getImplementationID(org), getImplementationID(clone));
         if (res && getImplementationID(org).length > 0) {
             log.println("ImplementationID equals the clone has the same id as the original Object");
             log.println("------------------------------------------------------------------------");


More information about the Libreoffice-commits mailing list