fix internal not cloneable error

This commit is contained in:
Sebastian Sdorra
2012-06-16 14:01:56 +02:00
parent e58025f3b8
commit bf86dc97e7

View File

@@ -46,7 +46,8 @@ import java.io.Serializable;
* @author Sebastian Sdorra
* @since 1.17
*/
public abstract class FileBaseCommandRequest implements Resetable, Serializable
public abstract class FileBaseCommandRequest
implements Resetable, Serializable, Cloneable
{
/**
@@ -164,6 +165,36 @@ public abstract class FileBaseCommandRequest implements Resetable, Serializable
return revision;
}
//~--- methods --------------------------------------------------------------
/**
* Method description
*
*
* @return
*
* @throws CloneNotSupportedException
*/
@Override
protected FileBaseCommandRequest clone() throws CloneNotSupportedException
{
FileBaseCommandRequest clone = null;
try
{
clone = (FileBaseCommandRequest) super.clone();
}
catch (CloneNotSupportedException e)
{
// this shouldn't happen, since we are Cloneable
throw new InternalError(
"FileBaseCommandRequest seems not to be cloneable");
}
return clone;
}
//~--- fields ---------------------------------------------------------------
/** Field description */