File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
java/ql/lib/semmle/code/java/dataflow Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -63,12 +63,24 @@ private module Input implements TypeFlowInput<Location> {
63
63
64
64
class Type = RefType ;
65
65
66
+ private SrcCallable viableCallable_v1 ( Call c ) {
67
+ result = viableImpl_v1 ( c )
68
+ or
69
+ c instanceof ConstructorCall and result = c .getCallee ( ) .getSourceDeclaration ( )
70
+ }
71
+
66
72
/**
67
- * Holds if `arg` is an argument for the parameter `p` in a private callable.
73
+ * Holds if `arg` is an argument for the parameter `p` in a sufficiently
74
+ * private callable that the closed-world assumption applies.
68
75
*/
69
76
private predicate privateParamArg ( Parameter p , Argument arg ) {
70
- p .getAnArgument ( ) = arg and
71
- p .getCallable ( ) .isPrivate ( )
77
+ exists ( SrcCallable c , Call call |
78
+ c = p .getCallable ( ) and
79
+ not c .isImplicitlyPublic ( ) and
80
+ not p .isVarargs ( ) and
81
+ c = viableCallable_v1 ( call ) and
82
+ call .getArgument ( pragma [ only_bind_into ] ( pragma [ only_bind_out ] ( p .getPosition ( ) ) ) ) = arg
83
+ )
72
84
}
73
85
74
86
/**
You can’t perform that action at this time.
0 commit comments