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

Change-Id: I7d875dd74f8eff05f7a291100841779abbf5fd1c
This commit is contained in:
Julien Nabet
2012-08-06 00:13:27 +02:00
parent c04c2114d9
commit b80b7ba179
15 changed files with 21 additions and 26 deletions
@@ -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 )
+2 -7
View File
@@ -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 ) {
}
}
+1 -1
View File
@@ -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);
}
}
}
}
@@ -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);
}
}
}
}
@@ -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);
}
+3 -3
View File
@@ -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();
}