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
try
{
// try to connect to soffice
Thread.currentThread().sleep( 500 );
Thread.sleep( 500 );
aInitialObject = xUrlResolver.resolve( mURL );
}
catch( com.sun.star.connection.NoConnectException aEx )
......
......@@ -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)
......
......@@ -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 ) {
......
......@@ -102,7 +102,7 @@ public class ComponentBase_Test
{
try
{
Thread.currentThread().sleep(100);
Thread.sleep(100);
System.gc();
System.runFinalization();
}catch (InterruptedException ie)
......
......@@ -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)
......
......@@ -133,7 +133,7 @@ public class SelectionChangeListener implements XSelectionChangeListener {
}
try {
Thread.currentThread().sleep( 500 );
Thread.sleep( 500 );
} catch( InterruptedException ex ) {
}
}
......
......@@ -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);
}
......
......@@ -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);
}
......
......@@ -211,7 +211,7 @@ public class _XCommandProcessor extends MultiMethodTest {
aborter.start();
try {
Thread.currentThread().sleep(15);
Thread.sleep(15);
} catch (InterruptedException e) {
}
......
......@@ -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
}
......@@ -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
}
......@@ -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);
}
......
......@@ -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) ;
}
......
......@@ -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)
{
......
......@@ -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();
}
......
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