Add more synchronization to avoid memory race conditions.

This commit is contained in:
hns 2008-07-28 10:23:03 +00:00
parent f3c6c7a93f
commit fb9f5cf8cd

View file

@ -314,7 +314,7 @@ public final class Application implements Runnable {
*
* @param ignoreDirs comma separated list of directory names to ignore
*/
public void init(final String ignoreDirs)
public synchronized void init(final String ignoreDirs)
throws DatabaseException, IllegalAccessException, InstantiationException,
ClassNotFoundException, InterruptedException {
@ -356,7 +356,7 @@ public final class Application implements Runnable {
}
}
private void initInternal()
private synchronized void initInternal()
throws DatabaseException, IllegalAccessException,
InstantiationException, ClassNotFoundException {
running = true;