From 053ecc68889e3b4ed1afd23ec12d6ff0aea593d4 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 13 Jun 2008 22:57:15 +0000 Subject: compiles again --- sources/events/VSAbstractEvent.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'sources/events/VSAbstractEvent.java') diff --git a/sources/events/VSAbstractEvent.java b/sources/events/VSAbstractEvent.java index 834b691..263f21f 100644 --- a/sources/events/VSAbstractEvent.java +++ b/sources/events/VSAbstractEvent.java @@ -55,17 +55,21 @@ abstract public class VSAbstractEvent extends VSPrefs { private String eventClassname; /** - * Creates a copy of the event. + * Creates a copy of the event. * * @return The copy */ final public VSAbstractEvent getCopy() throws VSEventNotCopyableException { - VSAbstractEvent copy = null + if (!(this instanceof VSCopyableEvent)) + throw new VSEventNotCopyableException(eventShortname); - if (this instanceof VSCopyableEvent) - throw new VSEventNotCopyableException(eventShortname); + VSAbstractEvent copy = + VSRegisteredEvents.createEventInstanceByClassname( + eventClassname, process); - return copy; + ((VSCopyableEvent) this).initCopy(copy); + + return copy; } /** -- cgit v1.2.3