summaryrefslogtreecommitdiff
path: root/qadevOOo/runner/convwatch/SimpleFileSemaphore.java
diff options
context:
space:
mode:
Diffstat (limited to 'qadevOOo/runner/convwatch/SimpleFileSemaphore.java')
-rw-r--r--qadevOOo/runner/convwatch/SimpleFileSemaphore.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/qadevOOo/runner/convwatch/SimpleFileSemaphore.java b/qadevOOo/runner/convwatch/SimpleFileSemaphore.java
index 9d608bdb332b..cbcf2468af2b 100644
--- a/qadevOOo/runner/convwatch/SimpleFileSemaphore.java
+++ b/qadevOOo/runner/convwatch/SimpleFileSemaphore.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,7 +36,7 @@ public class SimpleFileSemaphore /* extends *//* implements */
String m_sInternSemaphoreFile;
File m_aInternSemaphoreFile;
GlobalLogWriter m_aLog;
-
+
public static void sleep( int _nSeconds)
{
// wait a second here
@@ -48,7 +48,7 @@ public class SimpleFileSemaphore /* extends *//* implements */
{
}
}
-
+
public SimpleFileSemaphore() throws IllegalArgumentException
{
String sInternFileName;
@@ -65,7 +65,7 @@ public class SimpleFileSemaphore /* extends *//* implements */
m_sInternSemaphoreFile = null;
throw new IllegalArgumentException("Unknown System, can't initialise SimpleFileSemaphore");
}
-
+
m_sInternSemaphoreFile = sInternFileName;
m_aInternSemaphoreFile = new File(sInternFileName);
}
@@ -80,7 +80,7 @@ public class SimpleFileSemaphore /* extends *//* implements */
{
int nCount = 0;
int nCheckLoop = 1;
-
+
while ( nCheckLoop == 1)
{
// check if resource is available, if not, wait.
@@ -104,7 +104,7 @@ public class SimpleFileSemaphore /* extends *//* implements */
}
}
}
-
+
// block resource by ourself
try
{
@@ -112,7 +112,7 @@ public class SimpleFileSemaphore /* extends *//* implements */
aWriter.writeByte((int)1);
aWriter.close();
}
-
+
catch (java.io.FileNotFoundException fne)
{
m_aLog.get().println( "caught: FileNotFoundException");
@@ -156,7 +156,7 @@ public class SimpleFileSemaphore /* extends *//* implements */
System.out.println("FAILED");
}
}
-
+
private static void testSemaphoreFile(SimpleFileSemaphore a, boolean _bShouldFileExists)
{
System.out.println("Check if semaphore file exists.");
@@ -171,8 +171,8 @@ public class SimpleFileSemaphore /* extends *//* implements */
assure(_bShouldFileExists == SEMAPHORE_SHOULD_NOT_EXIST, "Semaphore should not exist!");
}
}
-
- public static void main( String[] argv )
+
+ public static void main( String[] argv )
{
SimpleFileSemaphore a = new SimpleFileSemaphore();