From 0f7f465675bfeaf8d5d0677bdfb9efa30924020d Mon Sep 17 00:00:00 2001 From: Francis Alexander Date: Tue, 16 Feb 2021 15:48:00 +0530 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Anders Schack-Mulligen --- .../semmle/code/java/frameworks/play/Play.qll | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/java/ql/src/semmle/code/java/frameworks/play/Play.qll b/java/ql/src/semmle/code/java/frameworks/play/Play.qll index 701766a4e75..fccf6546424 100644 --- a/java/ql/src/semmle/code/java/frameworks/play/Play.qll +++ b/java/ql/src/semmle/code/java/frameworks/play/Play.qll @@ -1,32 +1,32 @@ /** - * Provides classes and predicates for working with the `play` package. + * Provides classes and predicates for working with the Play framework. */ import java /** - * A `play.mvc.Result` class. + * The `play.mvc.Result` class. */ class PlayMvcResultClass extends Class { PlayMvcResultClass() { this.hasQualifiedName("play.mvc", "Result") } } /** - * A `play.mvc.Results` class. + * The `play.mvc.Results` class. */ class PlayMvcResultsClass extends Class { PlayMvcResultsClass() { this.hasQualifiedName("play.mvc", "Results") } } /** - * A `play.mvc.Http$RequestHeader` class. + * The `play.mvc.Http$RequestHeader` class. */ class PlayMvcHttpRequestHeader extends RefType { PlayMvcHttpRequestHeader() { this.hasQualifiedName("play.mvc", "Http$RequestHeader") } } /** - * A `play.mvc.BodyParser<>$Of"` annotation. + * A `play.mvc.BodyParser<>$Of` annotation. */ class PlayBodyParserAnnotation extends Annotation { PlayBodyParserAnnotation() { this.getType().hasQualifiedName("play.mvc", "BodyParser<>$Of") } @@ -42,7 +42,7 @@ class PlayAddCsrfTokenAnnotation extends Annotation { } /** - * A member with qualified name `F.Promise` of package `play.libs.F`. + * The type `play.libs.F.Promise`. */ class PlayAsyncResultPromise extends Member { PlayAsyncResultPromise() { @@ -55,7 +55,7 @@ class PlayAsyncResultPromise extends Member { } /** - * A type with qualified name `CompletionStage` of package `java.util.concurrent`. + * The type `java.util.concurrent.CompletionStage`. */ class PlayAsyncResultCompletionStage extends Type { PlayAsyncResultCompletionStage() { @@ -65,7 +65,7 @@ class PlayAsyncResultCompletionStage extends Type { } /** - * A class which extends PlayMvcController recursively to find all controllers. + * The class `play.mvc.Controller` or a class that transitively extends it. */ class PlayController extends Class { PlayController() { @@ -74,21 +74,21 @@ class PlayController extends Class { } /** - * A method to find PlayFramework controller action methods, these are mapping's to route files. + * A Play framework controller action method. These are mappings to route files. * * Sample Route - `POST /login @com.company.Application.login()`. * - * Example - class get's `index` & `login` as valid action methods. - * ``` + * Example - class gets `index` and `login` as valid action methods. + * ```java * public class Application extends Controller { - * public Result index(String username, String password) { - * return ok("It works!"); - * } + * public Result index(String username, String password) { + * return ok("It works!"); + * } * - * public Result login() { - * return ok("Log me In!"); - * } - * } + * public Result login() { + * return ok("Log me In!"); + * } + * } * ``` */ class PlayControllerActionMethod extends Method {