File tree Expand file tree Collapse file tree 3 files changed +10
-6
lines changed
java/ql/lib/semmle/code/java Expand file tree Collapse file tree 3 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,9 @@ class CollectionSizeMethod extends CollectionMethod {
7676
7777/** A method that mutates the collection it belongs to. */
7878class CollectionMutator extends CollectionMethod {
79- CollectionMutator ( ) { pragma [ only_bind_into ] ( this ) .getName ( ) .regexpMatch ( "add.*|remove.*|push|pop|clear" ) }
79+ CollectionMutator ( ) {
80+ pragma [ only_bind_into ] ( this ) .getName ( ) .regexpMatch ( "add.*|remove.*|push|pop|clear" )
81+ }
8082}
8183
8284/** A method call that mutates a collection. */
@@ -89,7 +91,9 @@ class CollectionMutation extends MethodAccess {
8991
9092/** A method that queries the contents of a collection without mutating it. */
9193class CollectionQueryMethod extends CollectionMethod {
92- CollectionQueryMethod ( ) { pragma [ only_bind_into ] ( this ) .getName ( ) .regexpMatch ( "contains|containsAll|get|size|peek" ) }
94+ CollectionQueryMethod ( ) {
95+ pragma [ only_bind_into ] ( this ) .getName ( ) .regexpMatch ( "contains|containsAll|get|size|peek" )
96+ }
9397}
9498
9599/** A `new` expression that allocates a fresh, empty collection. */
Original file line number Diff line number Diff line change @@ -45,9 +45,7 @@ abstract class GeneratedFile extends File { }
4545 * A file detected as generated based on commonly-used marker comments.
4646 */
4747library class MarkerCommentGeneratedFile extends GeneratedFile {
48- MarkerCommentGeneratedFile ( ) {
49- any ( GeneratedFileMarker t ) .getFile ( ) = this
50- }
48+ MarkerCommentGeneratedFile ( ) { any ( GeneratedFileMarker t ) .getFile ( ) = this }
5149}
5250
5351/**
Original file line number Diff line number Diff line change @@ -59,7 +59,9 @@ class MapMutation extends MethodAccess {
5959/** A method that queries the contents of the map it belongs to without mutating it. */
6060class MapQueryMethod extends MapMethod {
6161 MapQueryMethod ( ) {
62- pragma [ only_bind_into ] ( this ) .getName ( ) .regexpMatch ( "get|containsKey|containsValue|entrySet|keySet|values|isEmpty|size" )
62+ pragma [ only_bind_into ] ( this )
63+ .getName ( )
64+ .regexpMatch ( "get|containsKey|containsValue|entrySet|keySet|values|isEmpty|size" )
6365 }
6466}
6567
You can’t perform that action at this time.
0 commit comments