From 1e896c14d69b27e5643766ad6e9a00c2bdc8d581 Mon Sep 17 00:00:00 2001 From: Matthew Porter Date: Thu, 31 Mar 2005 02:51:04 +0000 Subject: [PATCH] Change clone() method to throw CloneNotSupportedException. --- .../java/org/acegisecurity/domain/impl/BusinessObject.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/domain/src/main/java/org/acegisecurity/domain/impl/BusinessObject.java b/domain/src/main/java/org/acegisecurity/domain/impl/BusinessObject.java index 132ea1e2db..f4219206b2 100644 --- a/domain/src/main/java/org/acegisecurity/domain/impl/BusinessObject.java +++ b/domain/src/main/java/org/acegisecurity/domain/impl/BusinessObject.java @@ -37,6 +37,7 @@ import java.io.Serializable; * * @author Carlos Sanchez * @author Ben Alex + * @author Matthew Porter * @version $Id$ */ public abstract class BusinessObject implements Serializable, Cloneable { @@ -61,12 +62,12 @@ public abstract class BusinessObject implements Serializable, Cloneable { * @see java.lang.Object#clone() * @see BeanUtils#cloneBean(Object) */ - public Object clone() { + public Object clone() throws CloneNotSupportedException { try { return BeanUtils.cloneBean(this); } catch (Exception e) { logger.error(e); - throw new IllegalStateException(e); + throw new CloneNotSupportedException(e.getMessage()); } }