You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2013/10/20 20:13:48 UTC

svn commit: r1533936 - /tomcat/trunk/java/org/apache/tomcat/websocket/Util.java

Author: markt
Date: Sun Oct 20 18:13:48 2013
New Revision: 1533936

URL: http://svn.apache.org/r1533936
Log:
Update comments that should have been changed when code was generalized.

Modified:
    tomcat/trunk/java/org/apache/tomcat/websocket/Util.java

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/Util.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/Util.java?rev=1533936&r1=1533935&r2=1533936&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/Util.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/Util.java Sun Oct 20 18:13:48 2013
@@ -177,8 +177,7 @@ public class Util {
     private static <T> Object getGenericType(Class<T> type,
             Class<? extends T> clazz) {
 
-        // Look to see if this class implements the generic MessageHandler<>
-        // interface
+        // Look to see if this class implements the interface of interest
 
         // Get all the interfaces
         Type[] interfaces = clazz.getGenericInterfaces();
@@ -186,7 +185,7 @@ public class Util {
             // Only need to check interfaces that use generics
             if (iface instanceof ParameterizedType) {
                 ParameterizedType pi = (ParameterizedType) iface;
-                // Look for the MessageHandler<> interface
+                // Look for the interface of interest
                 if (pi.getRawType() instanceof Class) {
                     if (type.isAssignableFrom((Class<?>) pi.getRawType())) {
                         return getTypeParameter(
@@ -204,11 +203,11 @@ public class Util {
         Object result = getGenericType(type, superClazz);
         if (result instanceof Class<?>) {
             // Superclass implements interface and defines explicit type for
-            // MessageHandler<>
+            // the interface of interest
             return result;
         } else if (result instanceof Integer) {
             // Superclass implements interface and defines unknown type for
-            // MessageHandler<>
+            // the interface of interest
             // Map that unknown type to the generic types defined in this class
             ParameterizedType superClassType =
                     (ParameterizedType) clazz.getGenericSuperclass();



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org