• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pmd / pmd / 996
80%

Build:
DEFAULT BRANCH: main
Ran 20 Nov 2026 04:11PM UTC
Jobs 1
Files 2225
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Nov 2026 03:48PM UTC coverage: 80.279% (+0.008%) from 80.271%
996

push

github

web-flow
[java] Fix #5798: NPath should not count && and || in plain value expressions (#7253)

Since the NPath rewrite in 7.14.0 every expression that is not a
condition was walked like one, so something as simple as
`boolean b = x != null && x;` doubled the NPath value of the method.
A few such local variables in front of a long if chain pushed methods
over the threshold that were fine in 7.13.

Short-circuit operators are now only counted when they decide the flow
(if/loop/ternary conditions) or give the result of a return, throw,
yield or switch expression arm. A ternary found in a value expression
still counts, and its condition is still analysed in full.

- Add CfExpressionVisitor.visit(ASTSwitchExpression) so that switch
  expressions nested in other expressions (cast, method argument, ...)
  have their arms counted, using the enclosing statement's state
- Update NPATH_COMP javadoc to describe where && and || are counted
- Fix NPathComplexity rule doc: link to NPATH_COMP, example value is 336
- Add tests for short-circuit operators in value contexts, nested
  switch expressions and the rule doc example

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Andreas Dangel <andreas.dangel@pmd-code.org>

20833 of 26928 branches covered (77.37%)

Branch coverage included in aggregate %.

23 of 23 new or added lines in 1 file covered. (100.0%)

44355 of 54274 relevant lines covered (81.72%)

0.83 hits per line

Jobs
ID Job ID Ran Files Coverage
1 996.1 20 Nov 2026 04:11PM UTC 2225
80.28
GitHub Action Run
Source Files on build 996
  • Tree
  • List 2225
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #996
  • 2a91c712 on github
  • Prev Build on main (#995)
  • Next Build on main (#998)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc