From 3c161f9c93d01b8e6d9f61ef2d34310f4b2a4117 Mon Sep 17 00:00:00 2001 From: Owen Mansel-Chan Date: Fri, 13 Feb 2026 22:47:44 +0000 Subject: [PATCH] Make contract of RegexMatch clear --- java/ql/lib/semmle/code/java/Concepts.qll | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/java/ql/lib/semmle/code/java/Concepts.qll b/java/ql/lib/semmle/code/java/Concepts.qll index 6ba7c01e3e3..d7d2be4d75d 100644 --- a/java/ql/lib/semmle/code/java/Concepts.qll +++ b/java/ql/lib/semmle/code/java/Concepts.qll @@ -14,6 +14,9 @@ private import semmle.code.java.frameworks.JavaxAnnotations * * Extend this class to refine existing API models. If you want to model new APIs, * extend `RegexMatch::Range` instead. + * + * These are either method calls, which return `true` when there is a match, or + * annotations, which are considered to match if they are present. */ class RegexMatch extends Expr instanceof RegexMatch::Range { /** Gets the expression for the regex being executed by this node. */ @@ -36,6 +39,9 @@ module RegexMatch { * * Extend this class to model new APIs. If you want to refine existing API models, * extend `RegexMatch` instead. + * + * These are either method calls, which return `true` when there is a match, or + * annotations, which are considered to match if they are present. */ abstract class Range extends Expr { /** Gets the expression for the regex being executed by this node. */