File tree Expand file tree Collapse file tree
java/ql/src/semmle/code/java/security Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -36,15 +36,21 @@ abstract class ParserConfig extends MethodAccess {
3636 */
3737 predicate disables ( Expr e ) {
3838 this .getArgument ( 0 ) = e and
39- this .getArgument ( 1 ) .( BooleanLiteral ) .getBooleanValue ( ) = false
39+ (
40+ this .getArgument ( 1 ) .( BooleanLiteral ) .getBooleanValue ( ) = false or
41+ this .getArgument ( 1 ) .( FieldAccess ) .getField ( ) .hasQualifiedName ( "java.lang" , "Boolean" , "FALSE" )
42+ )
4043 }
4144
4245 /**
4346 * Holds if the method enables a property.
4447 */
4548 predicate enables ( Expr e ) {
4649 this .getArgument ( 0 ) = e and
47- this .getArgument ( 1 ) .( BooleanLiteral ) .getBooleanValue ( ) = true
50+ (
51+ this .getArgument ( 1 ) .( BooleanLiteral ) .getBooleanValue ( ) = true or
52+ this .getArgument ( 1 ) .( FieldAccess ) .getField ( ) .hasQualifiedName ( "java.lang" , "Boolean" , "TRUE" )
53+ )
4854 }
4955}
5056
You can’t perform that action at this time.
0 commit comments