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-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org