Skip to content

Commit 0d66ceb

Browse files
committed
Autoformat
1 parent 3c25301 commit 0d66ceb

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

java/ql/lib/semmle/code/java/dataflow/StringPrefixes.qll

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@
55
* may be appended to it, then check `InterestingPrefix.getAnAppendedExpression(Expr)` to get your results.
66
*
77
* For example, to identify expressions that may follow "foo:" in some string, we could define:
8-
*
8+
*
99
* ```
10-
* private class FooPrefix extends InterestingPrefix {
10+
* private class FooPrefix extends InterestingPrefix {
1111
* int offset;
12-
* FooPrefix() { this.getStringValue().substring("foo:") = offset };
13-
* override int getOffset() { result = offset }
12+
* FooPrefix() { this.getStringValue().substring("foo:") = offset };
13+
* override int getOffset() { result = offset }
1414
* };
15-
*
15+
*
1616
* predicate mayFollowFoo(Expr e) { e = any(FooPrefix fp).getAnAppendedExpression() }
1717
* ```
1818
*
1919
* This will identify all the `suffix` expressions in contexts such as:
20-
*
20+
*
2121
* ```
2222
* "foo:" + suffix1
2323
* "barfoo:" + suffix2
@@ -33,7 +33,7 @@ private import semmle.code.java.StringFormat
3333
/**
3434
* A string constant that contains a prefix whose possible successor strings are returned
3535
* by `getAnAppendedExpression`.
36-
*
36+
*
3737
* Extend this class to specify prefixes whose successors should be analysed.
3838
*/
3939
abstract class InterestingPrefix extends CompileTimeConstantExpr {

0 commit comments

Comments
 (0)