Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions java/ql/lib/semmle/code/java/Overlay.qll
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,41 @@ private predicate discardReferableLocatable(@locatable el) {
not drl.existsInOverlay()
)
}

overlay[local]
private predicate baseConfigLocatable(@configLocatable l) { not isOverlay() and l = l }
Comment thread Fixed
Comment thread
kaspersv marked this conversation as resolved.
Outdated

overlay[local]
private predicate overlayHasConfigLocatables() {
Comment thread Fixed
isOverlay() and
exists(@configLocatable el)
}

overlay[discard_entity]
private predicate discardBaseConfigLocatable(@configLocatable el) {
Comment thread Fixed
// The properties extractor is currently not incremental, so if
// the overlay contains any config locatables, the overlay should
// contain a full extraction and all config locatables from base
// should be discarded.
baseConfigLocatable(el) and overlayHasConfigLocatables()
}

overlay[local]
private predicate baseXmlLocatable(@xmllocatable l) {
Comment thread Fixed
not isOverlay() and not files(l, _) and not xmlNs(l, _, _, _)
}

overlay[local]
private predicate overlayHasXmlLocatable() {
Comment thread Fixed
isOverlay() and
exists(@xmllocatable l | not files(l, _) and not xmlNs(l, _, _, _))
}

overlay[discard_entity]
private predicate discardBaseXmlLocatable(@xmllocatable el) {
Comment thread Fixed
// The XML extractor is currently not incremental, so if
// the overlay contains any XML locatables, the overlay should
// contain a full extraction and all XML locatables from base
// should be discarded.
baseXmlLocatable(el) and overlayHasXmlLocatable()
}
Loading