mirror of
https://github.com/github/codeql.git
synced 2026-04-24 16:25:15 +02:00
Java: Add pragma[only_bind_out] to Top::toString() calls
This commit is contained in:
@@ -27,7 +27,9 @@ class ImportType extends Import {
|
||||
/** Gets the imported type. */
|
||||
ClassOrInterface getImportedType() { imports(this, result, _, _) }
|
||||
|
||||
override string toString() { result = "import " + this.getImportedType().toString() }
|
||||
override string toString() {
|
||||
result = "import " + pragma[only_bind_out](this.getImportedType()).toString()
|
||||
}
|
||||
|
||||
override string getAPrimaryQlClass() { result = "ImportType" }
|
||||
}
|
||||
@@ -49,7 +51,9 @@ class ImportOnDemandFromType extends Import {
|
||||
/** Gets an imported type. */
|
||||
NestedType getAnImport() { result.getEnclosingType() = this.getTypeHoldingImport() }
|
||||
|
||||
override string toString() { result = "import " + this.getTypeHoldingImport().toString() + ".*" }
|
||||
override string toString() {
|
||||
result = "import " + pragma[only_bind_out](this.getTypeHoldingImport()).toString() + ".*"
|
||||
}
|
||||
|
||||
override string getAPrimaryQlClass() { result = "ImportOnDemandFromType" }
|
||||
}
|
||||
@@ -71,7 +75,7 @@ class ImportOnDemandFromPackage extends Import {
|
||||
|
||||
/** Gets a printable representation of this import declaration. */
|
||||
override string toString() {
|
||||
result = "import " + this.getPackageHoldingImport().toString() + ".*"
|
||||
result = "import " + pragma[only_bind_out](this.getPackageHoldingImport()).toString() + ".*"
|
||||
}
|
||||
|
||||
override string getAPrimaryQlClass() { result = "ImportOnDemandFromPackage" }
|
||||
@@ -100,7 +104,7 @@ class ImportStaticOnDemand extends Import {
|
||||
|
||||
/** Gets a printable representation of this import declaration. */
|
||||
override string toString() {
|
||||
result = "import static " + this.getTypeHoldingImport().toString() + ".*"
|
||||
result = "import static " + pragma[only_bind_out](this.getTypeHoldingImport()).toString() + ".*"
|
||||
}
|
||||
|
||||
override string getAPrimaryQlClass() { result = "ImportStaticOnDemand" }
|
||||
@@ -141,7 +145,9 @@ class ImportStaticTypeMember extends Import {
|
||||
|
||||
/** Gets a printable representation of this import declaration. */
|
||||
override string toString() {
|
||||
result = "import static " + this.getTypeHoldingImport().toString() + "." + this.getName()
|
||||
result =
|
||||
"import static " + pragma[only_bind_out](this.getTypeHoldingImport()).toString() + "." +
|
||||
this.getName()
|
||||
}
|
||||
|
||||
override string getAPrimaryQlClass() { result = "ImportStaticTypeMember" }
|
||||
|
||||
Reference in New Issue
Block a user