diff --git a/java/ql/src/semmle/code/java/frameworks/SpringWeb.qll b/java/ql/src/semmle/code/java/frameworks/SpringWeb.qll index d3e195b93be..a011af98cd5 100644 --- a/java/ql/src/semmle/code/java/frameworks/SpringWeb.qll +++ b/java/ql/src/semmle/code/java/frameworks/SpringWeb.qll @@ -1,3 +1,3 @@ import java import spring.SpringController -import spring.SpringWeb \ No newline at end of file +import spring.SpringWeb diff --git a/java/ql/src/semmle/code/java/frameworks/spring/SpringController.qll b/java/ql/src/semmle/code/java/frameworks/spring/SpringController.qll index ffdf38bd04f..3a3f4fcbd13 100644 --- a/java/ql/src/semmle/code/java/frameworks/spring/SpringController.qll +++ b/java/ql/src/semmle/code/java/frameworks/spring/SpringController.qll @@ -154,12 +154,14 @@ class SpringServletInputAnnotation extends Annotation { } } +/** An annotation of the type `org.springframework.web.bind.annotation.ModelAttribute`. */ class SpringModelAttributeAnnotation extends Annotation { SpringModelAttributeAnnotation() { getType().hasQualifiedName("org.springframework.web.bind.annotation", "ModelAttribute") } } +/** A parameter of a `SpringRequestMappingMethod`. */ class SpringRequestMappingParameter extends Parameter { SpringRequestMappingParameter() { getCallable() instanceof SpringRequestMappingMethod } diff --git a/java/ql/src/semmle/code/java/frameworks/spring/SpringHttp.qll b/java/ql/src/semmle/code/java/frameworks/spring/SpringHttp.qll index faf57d724ee..59016df25f8 100644 --- a/java/ql/src/semmle/code/java/frameworks/spring/SpringHttp.qll +++ b/java/ql/src/semmle/code/java/frameworks/spring/SpringHttp.qll @@ -1,3 +1,8 @@ +/** + * Provides classes for working with Spring classes and interfaces from + * `org.springframework.http`. + */ + import java /** The class `org.springframework.http.HttpEntity` or an instantiation of it. */ diff --git a/java/ql/src/semmle/code/java/frameworks/spring/SpringWeb.qll b/java/ql/src/semmle/code/java/frameworks/spring/SpringWeb.qll index 22addc852a4..4a71c71295e 100644 --- a/java/ql/src/semmle/code/java/frameworks/spring/SpringWeb.qll +++ b/java/ql/src/semmle/code/java/frameworks/spring/SpringWeb.qll @@ -1,15 +1,19 @@ +/** + * Provides classes for working with Spring web requests. + */ + import java /** An interface for web requests in the Spring framework. */ class SpringWebRequest extends Class { SpringWebRequest() { - hasQualifiedName("org.springframework.web.context.request", "WebRequest") + this.hasQualifiedName("org.springframework.web.context.request", "WebRequest") } } /** An interface for web requests in the Spring framework. */ class SpringNativeWebRequest extends Class { SpringNativeWebRequest() { - hasQualifiedName("org.springframework.web.context.request", "NativeWebRequest") + this.hasQualifiedName("org.springframework.web.context.request", "NativeWebRequest") } -} \ No newline at end of file +} diff --git a/java/ql/src/semmle/code/java/frameworks/spring/SpringWebClient.qll b/java/ql/src/semmle/code/java/frameworks/spring/SpringWebClient.qll index 2f1ae37d77a..3a8d4bb084a 100644 --- a/java/ql/src/semmle/code/java/frameworks/spring/SpringWebClient.qll +++ b/java/ql/src/semmle/code/java/frameworks/spring/SpringWebClient.qll @@ -1,3 +1,7 @@ +/** + * Provides classes for working with Spring web clients. + */ + import java import SpringHttp