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

pmd / pmd / 724
79%

Build:
DEFAULT BRANCH: main
Ran 14 Aug 2026 02:40PM UTC
Jobs 1
Files 2194
Run time 4min
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

14 Aug 2026 02:12PM UTC coverage: 79.311% (+0.01%) from 79.301%
724

push

github

web-flow
[java] Fix #6393: UnusedPrivateMethod FP on overloaded methods when overload resolution fails (#6947)

What:
  UnusedPrivateMethod reported a false positive on one of several overloaded
  private methods when a call's argument is the return value of a method
  declared in a type that is not on the auxiliary classpath (unresolved
  receiver/return type), causing overload resolution to fail.

Root cause:
  When overload resolution fails (OverloadSelectionResult#isFailed()), the
  selected method symbol is an arbitrary fallback, not the actually-called
  overload. The rule only branched into the conservative "whitelist all
  same-named candidates" path when the symbol was unresolved
  (JExecutableSymbol#isUnresolved()). A failed-but-resolved fallback
  therefore caused only that one overload to be marked used, flagging the
  remaining overload(s) as unused.

Fix:
  Treat a failed overload selection like an unresolved call, so all
  same-named private method candidates are whitelisted when the receiver
  may be an instance of the analysed class (existing handleUnresolvedCall
  logic). This is consistent with the rule's existing false-positive-avoiding
  trade-off for unresolved calls.

Testing:
  New test case in UnusedPrivateMethod.xml reproducing the issue (expects 0
  violations). Full UnusedPrivateMethodTest: 111 tests, 0 failures, 0 errors
  (2 pre-existing skipped).

Signed-off-by: 付典 <fudianchn@gmail.com>
Co-authored-by: Sören Glimm <git@uncleowen.de>

19521 of 25582 branches covered (76.31%)

Branch coverage included in aggregate %.

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

19 existing lines in 1 file now uncovered.

42281 of 52342 relevant lines covered (80.78%)

0.82 hits per line

Coverage Regressions

Lines Coverage ∆ File
19
84.38
0.78% pmd-java/src/main/java/net/sourceforge/pmd/lang/java/symbols/internal/asm/ClassStub.java
Jobs
ID Job ID Ran Files Coverage
1 724.1 14 Aug 2026 02:40PM UTC 2194
79.31
GitHub Action Run
Source Files on build 724
  • Tree
  • List 2194
  • Changed 4
  • Source Changed 2
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #724
  • 6dcf9f16 on github
  • Prev Build on main (#722)
  • Next Build on main (#725)
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