Skip to content

Commit 212a515

Browse files
author
Stephan Brandauer
committed
Java Automodel: drop return values void methods other than ctors from consideration for extraction in framework mode
1 parent d84501d commit 212a515

File tree

4 files changed

+16
-15
lines changed

4 files changed

+16
-15
lines changed

java/ql/automodel/src/AutomodelFrameworkModeCharacteristics.qll

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,13 @@ newtype JavaRelatedLocationType =
2626
newtype TFrameworkModeEndpoint =
2727
TExplicitParameter(Parameter p) or
2828
TQualifier(Callable c) { not c instanceof Constructor } or
29-
TReturnValue(Callable c) or
29+
TReturnValue(Callable c) {
30+
c instanceof Constructor or
31+
c instanceof Method and
32+
(
33+
not c.getReturnType() instanceof VoidType
34+
)
35+
} or
3036
TOverridableParameter(Method m, Parameter p) {
3137
p.getCallable() = m and
3238
m instanceof ModelExclusions::ModelApi and

0 commit comments

Comments
 (0)