Skip to content

jacodb-taint-configuration: better IsType condition specializer#208

Merged
lehvolk merged 2 commits intoUnitTestBot:developfrom
Saloed:saloed/fix-taint-config-resolver
Dec 14, 2023
Merged

jacodb-taint-configuration: better IsType condition specializer#208
lehvolk merged 2 commits intoUnitTestBot:developfrom
Saloed:saloed/fix-taint-config-resolver

Conversation

@Saloed
Copy link
Copy Markdown
Collaborator

@Saloed Saloed commented Dec 11, 2023

  • Handle the case when package and class matchers are exact after resolving alternatives
  • Faster matching for the whole hierarchy

@CaelmBleidd CaelmBleidd self-requested a review December 11, 2023 16:32
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 11, 2023

Codecov Report

Attention: 5 lines in your changes are missing coverage. Please review.

Comparison is base (207c306) 77.01% compared to head (672404f) 77.00%.

Files Patch % Lines
...b/taint/configuration/TaintConfigurationFeature.kt 80.76% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #208      +/-   ##
=============================================
- Coverage      77.01%   77.00%   -0.02%     
  Complexity      1632     1632              
=============================================
  Files            166      166              
  Lines           9543     9554      +11     
  Branches        1693     1697       +4     
=============================================
+ Hits            7350     7357       +7     
- Misses          1513     1514       +1     
- Partials         680      683       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Copy Markdown
Member

@CaelmBleidd CaelmBleidd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

cp.hierarchyExt().findSubClasses(cp.objectClass, allHierarchy = true, includeOwn = true)
if (unresolvedMatchers.isNotEmpty()) {
val allClassNames = cp.registeredLocations.flatMapTo(hashSetOf()) {
val names = it.jcLocation?.classNames ?: return@flatMapTo emptyList()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This api was not designed for often use so it's better at least to cache it somehow if it's possible

@lehvolk
Copy link
Copy Markdown
Collaborator

lehvolk commented Dec 14, 2023

Just in case almost all new code is not covered by tests

@lehvolk lehvolk merged commit 7eff2f4 into UnitTestBot:develop Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants