You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by oh...@apache.org on 2014/05/19 21:53:33 UTC

svn commit: r1596014 - in /commons/proper/configuration/trunk/src: main/java/org/apache/commons/configuration/event/EventType.java test/java/org/apache/commons/configuration/event/TestEventType.java

Author: oheger
Date: Mon May 19 19:53:33 2014
New Revision: 1596014

URL: http://svn.apache.org/r1596014
Log:
Added bounds for type parameter in EventType.

The generic type must at least be an Event.

Modified:
    commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/event/EventType.java
    commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/event/TestEventType.java

Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/event/EventType.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/event/EventType.java?rev=1596014&r1=1596013&r2=1596014&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/event/EventType.java (original)
+++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/event/EventType.java Mon May 19 19:53:33 2014
@@ -40,7 +40,7 @@ package org.apache.commons.configuration
  * @since 2.0
  * @param <T> the event associated with this type
  */
-public class EventType<T>
+public class EventType<T extends Event>
 {
     /** Constant for the format used by toString(). */
     private static final String FMT_TO_STRING = "%s [ %s ]";

Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/event/TestEventType.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/event/TestEventType.java?rev=1596014&r1=1596013&r2=1596014&view=diff
==============================================================================
--- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/event/TestEventType.java (original)
+++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/event/TestEventType.java Mon May 19 19:53:33 2014
@@ -18,8 +18,6 @@ package org.apache.commons.configuration
 
 import static org.junit.Assert.assertEquals;
 
-import java.util.EventObject;
-
 import org.junit.Before;
 import org.junit.Test;
 
@@ -31,12 +29,12 @@ import org.junit.Test;
 public class TestEventType
 {
     /** The event type to be tested. */
-    private EventType<EventObject> eventType;
+    private EventType<Event> eventType;
 
     @Before
     public void setUp() throws Exception
     {
-        eventType = new EventType<EventObject>(null, "TEST");
+        eventType = new EventType<Event>(null, "TEST");
     }
 
     /**