This is an automated email from the ASF dual-hosted git repository. juanpablo pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/jspwiki.git
commit 018cbdd2184d0f646a4d4162dc6146365c4fec01 Author: juanpablo <[email protected]> AuthorDate: Fri Aug 16 20:44:48 2019 +0200 removal of @deprecated code (6) - WikiEngineEvent: removed getWikiEngine(), use getEngine() instead --- .../org/apache/wiki/event/WikiEngineEvent.java | 51 +++++----------------- 1 file changed, 11 insertions(+), 40 deletions(-) diff --git a/jspwiki-main/src/main/java/org/apache/wiki/event/WikiEngineEvent.java b/jspwiki-main/src/main/java/org/apache/wiki/event/WikiEngineEvent.java index 082bf10..fed4cd0 100644 --- a/jspwiki-main/src/main/java/org/apache/wiki/event/WikiEngineEvent.java +++ b/jspwiki-main/src/main/java/org/apache/wiki/event/WikiEngineEvent.java @@ -27,8 +27,8 @@ import org.apache.wiki.WikiEngine; * @see org.apache.wiki.event.WikiEvent * @since 2.4.20 */ -public class WikiEngineEvent extends WikiEvent -{ +public class WikiEngineEvent extends WikiEvent { + private static final long serialVersionUID = 1829433967558773970L; /** Indicates a WikiEngine initialization event, fired as the @@ -50,9 +50,6 @@ public class WikiEngineEvent extends WikiEvent private WikiEngine m_engine; - // ............ - - /** * Constructs an instance of this event. * @param eventSource the Object that is the source of the event, @@ -60,31 +57,24 @@ public class WikiEngineEvent extends WikiEvent * method thows a ClassCastException * @param type the event type */ - public WikiEngineEvent( Object eventSource, int type ) - { + public WikiEngineEvent( Object eventSource, int type ) { super( eventSource, type ); m_engine = (WikiEngine)eventSource; } - /** * Sets the type of this event. * * @param type the type of this WikiEngineEvent. */ - protected void setType( int type ) - { - if ( type >= INITIALIZING && type <= STOPPED ) - { + protected void setType( int type ) { + if ( type >= INITIALIZING && type <= STOPPED ) { super.setType(type); - } - else - { + } else { super.setType(ERROR); } } - /** * Returns the WikiEngine that spawned this event. * @@ -95,19 +85,6 @@ public class WikiEngineEvent extends WikiEvent return m_engine; } - - /** - * Returns the WikiEngine that spawned this event. - * - * @return the WikiEngine that spawned this event. - * @deprecated use {@link #getEngine()} instead. - */ - public WikiEngine getWikiEngine() - { - return m_engine; - } - - /** * Returns <code>true</code> if the int value is a WikiPageEvent type. * @param type the event type @@ -118,16 +95,13 @@ public class WikiEngineEvent extends WikiEvent return type >= INITIALIZING && type <= STOPPED; } - /** * Returns a textual representation of the event type. * * @return a String representation of the type */ - public final String eventName() - { - switch ( getType() ) - { + public final String eventName() { + switch ( getType() ) { case INITIALIZING: return "INITIALIZING"; case INITIALIZED: return "INITIALIZED"; case SHUTDOWN: return "SHUTDOWN"; @@ -136,16 +110,13 @@ public class WikiEngineEvent extends WikiEvent } } - /** * Returns a human-readable description of the event type. * * @return a String description of the type */ - public final String getTypeDescription() - { - switch ( getType() ) - { + public final String getTypeDescription() { + switch ( getType() ) { case INITIALIZING: return "wiki engine initializing"; case INITIALIZED: return "wiki engine initialized"; case SHUTDOWN: return "wiki engine shutting down"; @@ -154,4 +125,4 @@ public class WikiEngineEvent extends WikiEvent } } -} // end class org.apache.wiki.event.WikiEngineEvent +}
