[Libreoffice-commits] .: bean/com bridges/test javaunohelper/com javaunohelper/test odk/examples qadevOOo/runner qadevOOo/tests sc/qa scripting/workben unotest/source

Julien Nabet serval2412 at kemper.freedesktop.org
Sun Aug 5 15:14:00 PDT 2012


 bean/com/sun/star/beans/LocalOfficeConnection.java                     |    2 +-
 bridges/test/testclient.java                                           |    9 ++-------
 javaunohelper/com/sun/star/comp/helper/Bootstrap.java                  |    2 +-
 javaunohelper/test/com/sun/star/lib/uno/helper/ComponentBase_Test.java |    2 +-
 javaunohelper/test/com/sun/star/lib/uno/helper/WeakBase_Test.java      |    4 ++--
 odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java       |    2 +-
 qadevOOo/runner/util/utils.java                                        |    2 +-
 qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster.java     |    2 +-
 qadevOOo/tests/java/ifc/ucb/_XCommandProcessor.java                    |    2 +-
 qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewHeaderCell.java         |    3 +--
 qadevOOo/tests/java/mod/_toolkit/AccessibleTabControl.java             |    3 +--
 qadevOOo/tests/java/mod/_toolkit/AccessibleTabPage.java                |    2 +-
 sc/qa/complex/calcPreview/ViewForwarder.java                           |    6 +++---
 scripting/workben/ifc/scripting/SecurityDialogUtil.java                |    2 +-
 unotest/source/java/org/openoffice/test/OfficeConnection.java          |    2 +-
 15 files changed, 19 insertions(+), 26 deletions(-)

New commits:
commit b80b7ba1791cdd9e79ed7a380b8981878f46b8a4
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Mon Aug 6 00:12:34 2012 +0200

    Static method sleep from Thread should be accessed in a static way
    
    Change-Id: I7d875dd74f8eff05f7a291100841779abbf5fd1c

diff --git a/bean/com/sun/star/beans/LocalOfficeConnection.java b/bean/com/sun/star/beans/LocalOfficeConnection.java
index f999ee4..6d81ac6 100644
--- a/bean/com/sun/star/beans/LocalOfficeConnection.java
+++ b/bean/com/sun/star/beans/LocalOfficeConnection.java
@@ -242,7 +242,7 @@ public class LocalOfficeConnection
                     try
                     {
                         // try to connect to soffice
-                        Thread.currentThread().sleep( 500 );
+                        Thread.sleep( 500 );
                         aInitialObject = xUrlResolver.resolve( mURL );
                     }
                     catch( com.sun.star.connection.NoConnectException aEx )
diff --git a/bridges/test/testclient.java b/bridges/test/testclient.java
index 217fe96..402485c 100644
--- a/bridges/test/testclient.java
+++ b/bridges/test/testclient.java
@@ -69,9 +69,8 @@ class MyCallMe implements XCallMe
     public void callOneway( /*IN*/String s, /*IN*/int nToDo ) throws com.sun.star.uno.RuntimeException
         {
             System.out.println( "entering callOneway" );
-//              this.wait( 5 );
             try {
-                Thread.currentThread().sleep( 4000 );
+                Thread.sleep( 4000 );
             }
             catch ( java.lang.Exception e )
             {
@@ -125,12 +124,8 @@ public class testclient
                         new Object[]{"iiop", xConnection, new MyInstanceProvider()});
 
                     System.out.println( "after building bridge" );
-//                  Object rInitialObject = m_bridge.mapInterfaceFrom(rootOid, XInterface.class);
-//                  XTestFactory rFactory =
-//                      UnoRuntime.queryInterface(XTestFactory.class,rInitialObject );
 
-//                  XCallMe callMerFactory->
-                    Thread.currentThread().sleep( 100000 );
+                    Thread.sleep( 100000 );
                 }
             }
             catch( com.sun.star.uno.Exception e)
diff --git a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
index b8a3bf1..120217f 100644
--- a/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
+++ b/javaunohelper/com/sun/star/comp/helper/Bootstrap.java
@@ -282,7 +282,7 @@ public class Bootstrap {
                     if (i == 600) {
                         throw new BootstrapException(ex.toString());
                     }
-                    Thread.currentThread().sleep( 500 );
+                    Thread.sleep( 500 );
                 }
             }
         } catch ( BootstrapException e ) {
diff --git a/javaunohelper/test/com/sun/star/lib/uno/helper/ComponentBase_Test.java b/javaunohelper/test/com/sun/star/lib/uno/helper/ComponentBase_Test.java
index 68b1f1a..c452fc5 100644
--- a/javaunohelper/test/com/sun/star/lib/uno/helper/ComponentBase_Test.java
+++ b/javaunohelper/test/com/sun/star/lib/uno/helper/ComponentBase_Test.java
@@ -102,7 +102,7 @@ public class ComponentBase_Test
         {
             try
             {
-                Thread.currentThread().sleep(100);
+                Thread.sleep(100);
                 System.gc();
                 System.runFinalization();
             }catch (InterruptedException ie)
diff --git a/javaunohelper/test/com/sun/star/lib/uno/helper/WeakBase_Test.java b/javaunohelper/test/com/sun/star/lib/uno/helper/WeakBase_Test.java
index 25e93eb..f70f1b2 100644
--- a/javaunohelper/test/com/sun/star/lib/uno/helper/WeakBase_Test.java
+++ b/javaunohelper/test/com/sun/star/lib/uno/helper/WeakBase_Test.java
@@ -128,7 +128,7 @@ public class WeakBase_Test
         {
             try
             {
-                Thread.currentThread().sleep(100);
+                Thread.sleep(100);
                 System.gc();
                 System.runFinalization();
             }catch (InterruptedException ie)
@@ -157,7 +157,7 @@ public class WeakBase_Test
         {
             try
             {
-                Thread.currentThread().sleep(100);
+                Thread.sleep(100);
                 System.gc();
                 System.runFinalization();
             }catch (InterruptedException ie)
diff --git a/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java b/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java
index 3a90b2d..b4ab571 100644
--- a/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java
+++ b/odk/examples/DevelopersGuide/Charts/SelectionChangeListener.java
@@ -133,7 +133,7 @@ public class SelectionChangeListener implements XSelectionChangeListener {
             }
 
             try {
-                Thread.currentThread().sleep( 500 );
+                Thread.sleep( 500 );
             } catch( InterruptedException ex ) {
             }
         }
diff --git a/qadevOOo/runner/util/utils.java b/qadevOOo/runner/util/utils.java
index 8e9f4fa..08acdc3 100644
--- a/qadevOOo/runner/util/utils.java
+++ b/qadevOOo/runner/util/utils.java
@@ -752,7 +752,7 @@ public class utils {
      */
     public static void shortWait(int milliseconds) {
         try {
-            Thread.currentThread().sleep(milliseconds);
+            Thread.sleep(milliseconds);
         } catch (InterruptedException e) {
             System.out.println("While waiting :" + e);
         }
diff --git a/qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster.java b/qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster.java
index c28505a..65629ec 100644
--- a/qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster.java
+++ b/qadevOOo/tests/java/ifc/sheet/_XEnhancedMouseClickBroadcaster.java
@@ -124,7 +124,7 @@ public class _XEnhancedMouseClickBroadcaster extends MultiMethodTest {
 
     private void shortWait() {
         try {
-            Thread.currentThread().sleep(2000);
+            Thread.sleep(2000);
         } catch (InterruptedException e) {
             System.out.println("While waiting :" + e);
         }
diff --git a/qadevOOo/tests/java/ifc/ucb/_XCommandProcessor.java b/qadevOOo/tests/java/ifc/ucb/_XCommandProcessor.java
index 0b47b4c..a5437cd 100644
--- a/qadevOOo/tests/java/ifc/ucb/_XCommandProcessor.java
+++ b/qadevOOo/tests/java/ifc/ucb/_XCommandProcessor.java
@@ -211,7 +211,7 @@ public class _XCommandProcessor extends MultiMethodTest {
         aborter.start();
 
         try {
-            Thread.currentThread().sleep(15);
+            Thread.sleep(15);
         } catch (InterruptedException e) {
         }
 
diff --git a/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewHeaderCell.java b/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewHeaderCell.java
index d7d18f8..ba6c952 100644
--- a/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewHeaderCell.java
+++ b/qadevOOo/tests/java/mod/_sc/ScAccessiblePreviewHeaderCell.java
@@ -276,9 +276,9 @@ public class ScAccessiblePreviewHeaderCell extends TestCase {
     */
     private void shortWait() {
         try {
-            Thread.currentThread().sleep(500);
+            Thread.sleep(500);
         } catch (InterruptedException e) {
             System.out.println("While waiting :" + e);
         }
     }
-}
\ No newline at end of file
+}
diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleTabControl.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleTabControl.java
index 819984e..3d3d948 100644
--- a/qadevOOo/tests/java/mod/_toolkit/AccessibleTabControl.java
+++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleTabControl.java
@@ -264,9 +264,9 @@ public class AccessibleTabControl extends TestCase {
     */
     private void shortWait() {
         try {
-            Thread.currentThread().sleep(500);
+            Thread.sleep(500);
         } catch (InterruptedException e) {
             System.out.println("While waiting :" + e);
         }
     }
-}
\ No newline at end of file
+}
diff --git a/qadevOOo/tests/java/mod/_toolkit/AccessibleTabPage.java b/qadevOOo/tests/java/mod/_toolkit/AccessibleTabPage.java
index ea3ff9e..014dbd1 100644
--- a/qadevOOo/tests/java/mod/_toolkit/AccessibleTabPage.java
+++ b/qadevOOo/tests/java/mod/_toolkit/AccessibleTabPage.java
@@ -270,7 +270,7 @@ public class AccessibleTabPage extends TestCase {
     */
     private void shortWait() {
         try {
-            Thread.currentThread().sleep(1000);
+            Thread.sleep(1000);
         } catch (InterruptedException e) {
             System.out.println("While waiting :" + e);
         }
diff --git a/sc/qa/complex/calcPreview/ViewForwarder.java b/sc/qa/complex/calcPreview/ViewForwarder.java
index ea548d3..7d3fd9c 100644
--- a/sc/qa/complex/calcPreview/ViewForwarder.java
+++ b/sc/qa/complex/calcPreview/ViewForwarder.java
@@ -893,7 +893,7 @@ public class ViewForwarder {
         }
 
         try {
-            Thread.currentThread().sleep(500) ;
+            Thread.sleep(500) ;
         } catch (InterruptedException e) {
             System.out.println("While waiting :" + e) ;
         }
@@ -996,7 +996,7 @@ public class ViewForwarder {
         }
 
         try {
-            Thread.currentThread().sleep(500) ;
+            Thread.sleep(500) ;
         } catch (InterruptedException e) {
             System.out.println("While waiting :" + e) ;
         }
@@ -1038,7 +1038,7 @@ public class ViewForwarder {
         }
 
         try {
-            Thread.currentThread().sleep(500) ;
+            Thread.sleep(500) ;
         } catch (InterruptedException e) {
             System.out.println("While waiting :" + e) ;
         }
diff --git a/scripting/workben/ifc/scripting/SecurityDialogUtil.java b/scripting/workben/ifc/scripting/SecurityDialogUtil.java
index 5a49747..8edb9a9 100644
--- a/scripting/workben/ifc/scripting/SecurityDialogUtil.java
+++ b/scripting/workben/ifc/scripting/SecurityDialogUtil.java
@@ -81,7 +81,7 @@ public void run()
     // wait for the message box to appear
     try
     {
-        Thread.currentThread().sleep(4000) ;
+        Thread.sleep(4000) ;
     }
     catch (InterruptedException e)
     {
diff --git a/unotest/source/java/org/openoffice/test/OfficeConnection.java b/unotest/source/java/org/openoffice/test/OfficeConnection.java
index 311392b..d8774a1 100644
--- a/unotest/source/java/org/openoffice/test/OfficeConnection.java
+++ b/unotest/source/java/org/openoffice/test/OfficeConnection.java
@@ -201,7 +201,7 @@ public final class OfficeConnection {
         Thread t2 = new Thread("waitForProcess") {
                 public void run() {
                     try {
-                        Thread.currentThread().sleep(millis);
+                        Thread.sleep(millis);
                     } catch (InterruptedException e) {}
                     t1.interrupt();
                 }


More information about the Libreoffice-commits mailing list