diff --git a/guacamole/src/main/java/org/apache/guacamole/rest/RESTMethodMatcher.java b/guacamole/src/main/java/org/apache/guacamole/rest/RESTMethodMatcher.java index c80750c40..623932f9f 100644 --- a/guacamole/src/main/java/org/apache/guacamole/rest/RESTMethodMatcher.java +++ b/guacamole/src/main/java/org/apache/guacamole/rest/RESTMethodMatcher.java @@ -23,6 +23,7 @@ import com.google.inject.matcher.AbstractMatcher; import java.lang.annotation.Annotation; import java.lang.reflect.Method; import javax.ws.rs.HttpMethod; +import javax.ws.rs.Path; import org.apache.guacamole.GuacamoleException; /** @@ -67,7 +68,7 @@ public class RESTMethodMatcher extends AbstractMatcher { /** * Returns whether the given method is annotated as a REST method. A REST * method is annotated with an annotation which is annotated with - * @HttpMethod. + * @HttpMethod or @Path. * * @param method * The method to test. @@ -86,6 +87,10 @@ public class RESTMethodMatcher extends AbstractMatcher { if (annotationType.isAnnotationPresent(HttpMethod.class)) return true; + // A method is a REST method if it is annotated with @Path + if (Path.class.isAssignableFrom(annotationType)) + return true; + } // A method is also REST method if it overrides a REST method within