Skip to content
Snippets Groups Projects
Commit 3e4bb4d8 authored by ribeaudc's avatar ribeaudc
Browse files

fix: - Bugs found by FindBugs.

SVN: 6260
parent 3725dea6
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,7 @@
package ch.systemsx.cisd.common.highwatermark;
import java.io.File;
import java.io.Serializable;
import java.util.Properties;
import org.apache.commons.lang.StringUtils;
......@@ -31,9 +32,11 @@ import ch.systemsx.cisd.common.utilities.PropertyUtils;
*
* @author Christian Ribeaud
*/
public final class FileWithHighwaterMark extends AbstractHashable
public final class FileWithHighwaterMark extends AbstractHashable implements Serializable
{
private static final long serialVersionUID = 1L;
/**
* The property name under which you must find a <code>long</code> for the high water mark (in
* <i>kilobytes</i>).
......
......@@ -18,6 +18,7 @@ package ch.systemsx.cisd.common.highwatermark;
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
......@@ -231,8 +232,10 @@ public final class HighwaterMarkWatcher implements Runnable
}
}
public final static class HighwaterMarkState
public final static class HighwaterMarkState implements Serializable
{
private static final long serialVersionUID = 1L;
private final FileWithHighwaterMark fileWithHighwaterMark;
private final long freeSpace;
......
......@@ -227,7 +227,10 @@ public final class ProcessExecutionHelper
} finally
{
closeStreams(process);
process.destroy();
if (process != null)
{
process.destroy();
}
}
}
......@@ -254,7 +257,10 @@ public final class ProcessExecutionHelper
} finally
{
closeStreams(process);
process.destroy();
if (process != null)
{
process.destroy();
}
}
}
......
......@@ -124,7 +124,7 @@ public final class ProcessWatchdog implements Runnable
// Runnable
//
public final void run()
public final synchronized void run()
{
try
{
......
......@@ -79,7 +79,7 @@ public final class PropertyUtilsTest
PropertyUtils.getMandatoryProperty(properties, propertyKey);
} catch (final ConfigurationFailureException ex)
{
assertEquals(String.format(PropertyUtils.EMPTY_STRING_FORMAT, propertyKey, "[]"), ex
assertEquals(String.format(PropertyUtils.EMPTY_STRING_FORMAT, propertyKey), ex
.getMessage());
}
final String value = "value";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment