Kaydet (Commit) b80b7ba1 authored tarafından Julien Nabet's avatar Julien Nabet

Static method sleep from Thread should be accessed in a static way

Change-Id: I7d875dd74f8eff05f7a291100841779abbf5fd1c
üst c04c2114
...@@ -242,7 +242,7 @@ public class LocalOfficeConnection ...@@ -242,7 +242,7 @@ public class LocalOfficeConnection
try try
{ {
// try to connect to soffice // try to connect to soffice
Thread.currentThread().sleep( 500 ); Thread.sleep( 500 );
aInitialObject = xUrlResolver.resolve( mURL ); aInitialObject = xUrlResolver.resolve( mURL );
} }
catch( com.sun.star.connection.NoConnectException aEx ) catch( com.sun.star.connection.NoConnectException aEx )
......
...@@ -69,9 +69,8 @@ class MyCallMe implements XCallMe ...@@ -69,9 +69,8 @@ class MyCallMe implements XCallMe
public void callOneway( /*IN*/String s, /*IN*/int nToDo ) throws com.sun.star.uno.RuntimeException public void callOneway( /*IN*/String s, /*IN*/int nToDo ) throws com.sun.star.uno.RuntimeException
{ {
System.out.println( "entering callOneway" ); System.out.println( "entering callOneway" );
// this.wait( 5 );
try { try {
Thread.currentThread().sleep( 4000 ); Thread.sleep( 4000 );
} }
catch ( java.lang.Exception e ) catch ( java.lang.Exception e )
{ {
...@@ -125,12 +124,8 @@ public class testclient ...@@ -125,12 +124,8 @@ public class testclient
new Object[]{"iiop", xConnection, new MyInstanceProvider()}); new Object[]{"iiop", xConnection, new MyInstanceProvider()});
System.out.println( "after building bridge" ); System.out.println( "after building bridge" );
// Object rInitialObject = m_bridge.mapInterfaceFrom(rootOid, XInterface.class);
// XTestFactory rFactory =
// UnoRuntime.queryInterface(XTestFactory.class,rInitialObject );
// XCallMe callMerFactory-> Thread.sleep( 100000 );
Thread.currentThread().sleep( 100000 );
} }
} }
catch( com.sun.star.uno.Exception e) catch( com.sun.star.uno.Exception e)
......
...@@ -282,7 +282,7 @@ public class Bootstrap { ...@@ -282,7 +282,7 @@ public class Bootstrap {
if (i == 600) { if (i == 600) {
throw new BootstrapException(ex.toString()); throw new BootstrapException(ex.toString());
} }
Thread.currentThread().sleep( 500 ); Thread.sleep( 500 );
} }
} }
} catch ( BootstrapException e ) { } catch ( BootstrapException e ) {
......
...@@ -102,7 +102,7 @@ public class ComponentBase_Test ...@@ -102,7 +102,7 @@ public class ComponentBase_Test
{ {
try try
{ {
Thread.currentThread().sleep(100); Thread.sleep(100);
System.gc(); System.gc();
System.runFinalization(); System.runFinalization();
}catch (InterruptedException ie) }catch (InterruptedException ie)
......
...@@ -128,7 +128,7 @@ public class WeakBase_Test ...@@ -128,7 +128,7 @@ public class WeakBase_Test
{ {
try try
{ {
Thread.currentThread().sleep(100); Thread.sleep(100);
System.gc(); System.gc();
System.runFinalization(); System.runFinalization();
}catch (InterruptedException ie) }catch (InterruptedException ie)
...@@ -157,7 +157,7 @@ public class WeakBase_Test ...@@ -157,7 +157,7 @@ public class WeakBase_Test
{ {
try try
{ {
Thread.currentThread().sleep(100); Thread.sleep(100);
System.gc(); System.gc();
System.runFinalization(); System.runFinalization();
}catch (InterruptedException ie) }catch (InterruptedException ie)
......
...@@ -133,7 +133,7 @@ public class SelectionChangeListener implements XSelectionChangeListener { ...@@ -133,7 +133,7 @@ public class SelectionChangeListener implements XSelectionChangeListener {
} }
try { try {
Thread.currentThread().sleep( 500 ); Thread.sleep( 500 );
} catch( InterruptedException ex ) { } catch( InterruptedException ex ) {
} }
} }
......
...@@ -752,7 +752,7 @@ public class utils { ...@@ -752,7 +752,7 @@ public class utils {
*/ */
public static void shortWait(int milliseconds) { public static void shortWait(int milliseconds) {
try { try {
Thread.currentThread().sleep(milliseconds); Thread.sleep(milliseconds);
} catch (InterruptedException e) { } catch (InterruptedException e) {
System.out.println("While waiting :" + e); System.out.println("While waiting :" + e);
} }
......
...@@ -124,7 +124,7 @@ public class _XEnhancedMouseClickBroadcaster extends MultiMethodTest { ...@@ -124,7 +124,7 @@ public class _XEnhancedMouseClickBroadcaster extends MultiMethodTest {
private void shortWait() { private void shortWait() {
try { try {
Thread.currentThread().sleep(2000); Thread.sleep(2000);
} catch (InterruptedException e) { } catch (InterruptedException e) {
System.out.println("While waiting :" + e); System.out.println("While waiting :" + e);
} }
......
...@@ -211,7 +211,7 @@ public class _XCommandProcessor extends MultiMethodTest { ...@@ -211,7 +211,7 @@ public class _XCommandProcessor extends MultiMethodTest {
aborter.start(); aborter.start();
try { try {
Thread.currentThread().sleep(15); Thread.sleep(15);
} catch (InterruptedException e) { } catch (InterruptedException e) {
} }
......
...@@ -276,7 +276,7 @@ public class ScAccessiblePreviewHeaderCell extends TestCase { ...@@ -276,7 +276,7 @@ public class ScAccessiblePreviewHeaderCell extends TestCase {
*/ */
private void shortWait() { private void shortWait() {
try { try {
Thread.currentThread().sleep(500); Thread.sleep(500);
} catch (InterruptedException e) { } catch (InterruptedException e) {
System.out.println("While waiting :" + e); System.out.println("While waiting :" + e);
} }
......
...@@ -264,7 +264,7 @@ public class AccessibleTabControl extends TestCase { ...@@ -264,7 +264,7 @@ public class AccessibleTabControl extends TestCase {
*/ */
private void shortWait() { private void shortWait() {
try { try {
Thread.currentThread().sleep(500); Thread.sleep(500);
} catch (InterruptedException e) { } catch (InterruptedException e) {
System.out.println("While waiting :" + e); System.out.println("While waiting :" + e);
} }
......
...@@ -270,7 +270,7 @@ public class AccessibleTabPage extends TestCase { ...@@ -270,7 +270,7 @@ public class AccessibleTabPage extends TestCase {
*/ */
private void shortWait() { private void shortWait() {
try { try {
Thread.currentThread().sleep(1000); Thread.sleep(1000);
} catch (InterruptedException e) { } catch (InterruptedException e) {
System.out.println("While waiting :" + e); System.out.println("While waiting :" + e);
} }
......
...@@ -893,7 +893,7 @@ public class ViewForwarder { ...@@ -893,7 +893,7 @@ public class ViewForwarder {
} }
try { try {
Thread.currentThread().sleep(500) ; Thread.sleep(500) ;
} catch (InterruptedException e) { } catch (InterruptedException e) {
System.out.println("While waiting :" + e) ; System.out.println("While waiting :" + e) ;
} }
...@@ -996,7 +996,7 @@ public class ViewForwarder { ...@@ -996,7 +996,7 @@ public class ViewForwarder {
} }
try { try {
Thread.currentThread().sleep(500) ; Thread.sleep(500) ;
} catch (InterruptedException e) { } catch (InterruptedException e) {
System.out.println("While waiting :" + e) ; System.out.println("While waiting :" + e) ;
} }
...@@ -1038,7 +1038,7 @@ public class ViewForwarder { ...@@ -1038,7 +1038,7 @@ public class ViewForwarder {
} }
try { try {
Thread.currentThread().sleep(500) ; Thread.sleep(500) ;
} catch (InterruptedException e) { } catch (InterruptedException e) {
System.out.println("While waiting :" + e) ; System.out.println("While waiting :" + e) ;
} }
......
...@@ -81,7 +81,7 @@ public void run() ...@@ -81,7 +81,7 @@ public void run()
// wait for the message box to appear // wait for the message box to appear
try try
{ {
Thread.currentThread().sleep(4000) ; Thread.sleep(4000) ;
} }
catch (InterruptedException e) catch (InterruptedException e)
{ {
......
...@@ -201,7 +201,7 @@ public final class OfficeConnection { ...@@ -201,7 +201,7 @@ public final class OfficeConnection {
Thread t2 = new Thread("waitForProcess") { Thread t2 = new Thread("waitForProcess") {
public void run() { public void run() {
try { try {
Thread.currentThread().sleep(millis); Thread.sleep(millis);
} catch (InterruptedException e) {} } catch (InterruptedException e) {}
t1.interrupt(); t1.interrupt();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment