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/03/15 20:57:05 UTC
svn commit: r1457087 -
/tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java
Author: markt
Date: Fri Mar 15 19:57:05 2013
New Revision: 1457087
URL: http://svn.apache.org/r1457087
Log:
Need to check all types for OnParam and if one is found, move on to the next parameter
Modified:
tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java
Modified: tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java?rev=1457087&r1=1457086&r2=1457087&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/pojo/PojoMethodMapping.java Fri Mar 15 19:57:05 2013
@@ -279,17 +279,22 @@ public class PojoMethodMapping {
Annotation[][] paramsAnnotations = m.getParameterAnnotations();
for (int i = 0; i < types.length; i++) {
- if (types[i] == String.class) {
- Annotation[] paramAnnotations = paramsAnnotations[i];
- for (Annotation paramAnnotation : paramAnnotations) {
- if (paramAnnotation.annotationType().equals(
- PathParam.class)) {
- indexPathParams.put(
- Integer.valueOf(i), new PojoPathParam(types[i],
- ((PathParam) paramAnnotation).value()));
- break;
- }
+ boolean paramFound = false;
+ Annotation[] paramAnnotations = paramsAnnotations[i];
+ for (Annotation paramAnnotation : paramAnnotations) {
+ if (paramAnnotation.annotationType().equals(
+ PathParam.class)) {
+ indexPathParams.put(
+ Integer.valueOf(i), new PojoPathParam(types[i],
+ ((PathParam) paramAnnotation).value()));
+ paramFound = true;
+ break;
}
+ }
+ if (paramFound) {
+ continue;
+ }
+ if (types[i] == String.class) {
if (indexString == -1) {
indexString = i;
} else {
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org