Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit be150f2

Browse files
author
Benjamin Muskalla
committed
Formatting
1 parent 2654e27 commit be150f2

3 files changed

Lines changed: 10 additions & 9 deletions

File tree

java/ql/src/utils/model-generator/CaptureSinkModels.ql

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class PropagateToSinkConfiguration extends TaintTracking::Configuration {
2121
isRelevantForModels(source.getEnclosingCallable())
2222
}
2323

24-
override predicate isSink(DataFlow::Node sink) { sinkNode(sink, _)}
24+
override predicate isSink(DataFlow::Node sink) { sinkNode(sink, _) }
2525
}
2626

2727
string asInputArgument(DataFlow::Node source) {
@@ -38,6 +38,5 @@ string captureSink(Callable api) {
3838
}
3939

4040
from TargetAPI api, string sink
41-
where
42-
sink = captureSink(api)
41+
where sink = captureSink(api)
4342
select sink order by sink

java/ql/src/utils/model-generator/CaptureSourceModels.ql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,5 @@ string captureSource(Callable api) {
4848
}
4949

5050
from TargetAPI api, string sink
51-
where
52-
sink = captureSource(api)
51+
where sink = captureSource(api)
5352
select sink order by sink

java/ql/src/utils/model-generator/ModelGeneratorUtils.qll

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@ class TargetAPI extends Callable {
99
this.getDeclaringType().isPublic() and
1010
isRelevantForModels(this)
1111
}
12-
1312
}
1413

15-
private string isExtensible(RefType ref) { if ref.isFinal() then result = "false" else result = "true" }
14+
private string isExtensible(RefType ref) {
15+
if ref.isFinal() then result = "false" else result = "true"
16+
}
1617

1718
predicate isRelevantForModels(Callable api) {
1819
not isInTestFile(api.getCompilationUnit().getFile()) and
@@ -26,7 +27,9 @@ private predicate isInTestFile(File file) {
2627
}
2728

2829
private predicate isJdkInternal(CompilationUnit cu) {
29-
cu.getPackage().getName().matches("com.sun") or cu.getPackage().getName().matches("sun") or cu.getPackage().getName().matches("")
30+
cu.getPackage().getName().matches("com.sun") or
31+
cu.getPackage().getName().matches("sun") or
32+
cu.getPackage().getName().matches("")
3033
}
3134

3235
bindingset[input, output]
@@ -81,4 +84,4 @@ string parameterAccess(Parameter p) {
8184
if p.getType() instanceof ContainerType
8285
then result = "Element of Argument[" + p.getPosition() + "]"
8386
else result = "Argument[" + p.getPosition() + "]"
84-
}
87+
}

0 commit comments

Comments
 (0)