mirror of
https://github.com/github/codeql.git
synced 2026-04-24 00:05:14 +02:00
Fix QLDocs
This commit is contained in:
@@ -148,7 +148,7 @@ private predicate hasPathAnnotation(Annotatable annotatable) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if the class inherites the JaxRs `@Path` annotation.
|
||||
* Holds if the class has or inherits the JaxRs `@Path` annotation.
|
||||
*/
|
||||
private predicate hasOrInheritsPathAnnotation(Class c) {
|
||||
hasPathAnnotation(c)
|
||||
@@ -156,7 +156,8 @@ private predicate hasOrInheritsPathAnnotation(Class c) {
|
||||
// Note that by the JAX-RS spec, JAX-RS annotations on classes and interfaces
|
||||
// are not inherited, but some implementations, like Apache CXF, do inherit
|
||||
// them. I think this only applies if there are no JaxRS annotations on the
|
||||
// class itself.
|
||||
// class itself, as that is the rule in the JAX-RS spec for method
|
||||
// annotations.
|
||||
hasPathAnnotation(c.getAnAncestor()) and
|
||||
not exists(c.getAnAnnotation().(JaxRSAnnotation))
|
||||
}
|
||||
|
||||
@@ -24,9 +24,11 @@ import jakarta.ws.rs.core.MultivaluedMap;
|
||||
import jakarta.ws.rs.core.Response;
|
||||
import jakarta.ws.rs.ext.MessageBodyReader;
|
||||
|
||||
// This is not a resource class because it doesn't have a @Path annotation.
|
||||
// Note that inheritance of class or interface annotations is not supported in
|
||||
// JAX-RS.
|
||||
// By the JAX-RS spec, this is not a resource class because it doesn't
|
||||
// have a @Path annotation. Inheritance of class or interface annotations
|
||||
// is not supported in JAX-RS. However, this is a resource class for some
|
||||
// implementations, like Apache CXF, that allow inheritance of JAX-RS
|
||||
// annotations on classes and interfaces.
|
||||
public class JakartaRs4 implements JakartaRsInterface { // $ RootResourceClass
|
||||
public JakartaRs4() { // $ InjectableConstructor
|
||||
}
|
||||
|
||||
@@ -24,9 +24,11 @@ import javax.ws.rs.core.MultivaluedMap;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.ext.MessageBodyReader;
|
||||
|
||||
// This is not a resource class because it doesn't have a @Path annotation.
|
||||
// Note that inheritance of class or interface annotations is not supported in
|
||||
// JAX-RS.
|
||||
// By the JAX-RS spec, this is not a resource class because it doesn't
|
||||
// have a @Path annotation. Inheritance of class or interface annotations
|
||||
// is not supported in JAX-RS. However, this is a resource class for some
|
||||
// implementations, like Apache CXF, that allow inheritance of JAX-RS
|
||||
// annotations on classes and interfaces.
|
||||
public class JaxRs4 implements JaxRsInterface { // $ RootResourceClass
|
||||
public JaxRs4() { // $ InjectableConstructor
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ import javax.ws.rs.core.MultivaluedMap;
|
||||
import javax.ws.rs.core.Response;
|
||||
import javax.ws.rs.ext.MessageBodyReader;
|
||||
|
||||
@Path("/resource") // This annotation has no effect, as class/interface annotations are not inherited in jax-rs
|
||||
@Path("/resource")
|
||||
public interface JaxRsInterface {
|
||||
@GET
|
||||
int Get(); // $ ResourceMethod
|
||||
|
||||
Reference in New Issue
Block a user