Skip to content

Commit ed9ed43

Browse files
committed
Java: Address review comment. Improve getAnImportedType definition
1 parent 1caf18e commit ed9ed43

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

java/ql/lib/semmle/code/java/Import.qll

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,8 @@ class ModuleImportDeclaration extends Import {
179179
)
180180
}
181181

182-
/** Gets a type that is imported from the module. */
183-
RefType getAnImportedType() {
184-
exists(Package pkg |
185-
pkg = this.getAnImportedPackage() and
186-
result.getPackage() = pkg
187-
)
188-
}
182+
/** Gets a type from a package that is accessible through this module import. */
183+
RefType getAnImportedType() { result.getPackage() = this.getAnImportedPackage() }
189184

190185
override string toString() { result = "import module " + this.getModuleName() }
191186

0 commit comments

Comments
 (0)