mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Java: merge the @class and @interface database types and tables
This will allow the extractor to emit class(id, ...) when all it knows about a class is its name, due to not having it available on the classpath. Previously it would have had to guess whether it belonged to @class or @interface, possibly introducing an inconsistency.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
class ClassOrInterface extends @classorinterface {
|
||||
string toString() { result = "class-or-interface" }
|
||||
}
|
||||
|
||||
class Package extends @package {
|
||||
string toString() { result = "package" }
|
||||
}
|
||||
|
||||
from ClassOrInterface id, string nodeName, Package parentId, ClassOrInterface sourceId
|
||||
where classes_or_interfaces(id, nodeName, parentId, sourceId) and not isInterface(id)
|
||||
select id, nodeName, parentId, sourceId
|
||||
@@ -0,0 +1,11 @@
|
||||
class ClassOrInterface extends @classorinterface {
|
||||
string toString() { result = "class-or-interface" }
|
||||
}
|
||||
|
||||
class Package extends @package {
|
||||
string toString() { result = "package" }
|
||||
}
|
||||
|
||||
from ClassOrInterface id, string nodeName, Package parentId, ClassOrInterface sourceId
|
||||
where classes_or_interfaces(id, nodeName, parentId, sourceId) and isInterface(id)
|
||||
select id, nodeName, parentId, sourceId
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,5 @@
|
||||
description: Seperate class and interface tables
|
||||
compatibility: full
|
||||
classes.rel: run classes.qlo
|
||||
interfaces.rel: run interfaces.qlo
|
||||
isInterface.rel: delete
|
||||
Reference in New Issue
Block a user