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

pmd / pmd / 909
80%

Build:
DEFAULT BRANCH: main
Ran 29 Oct 2026 08:12AM UTC
Jobs 1
Files 2222
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

29 Oct 2026 07:44AM UTC coverage: 80.048% (+0.001%) from 80.047%
909

push

github

web-flow
[java] Fix #6409: UnnecessaryCast false positive for anonymous class (#7193)

PMD types an anonymous class creation like `new Foo() {}` as `Foo`,
so the rule saw `(Foo) new Foo() {}` as an identity cast and reported
it. The type of the expression is the anonymous class, a strict subtype
of `Foo`. In a lambda returned to a generic method such as
`stream.map(i -> (Foo) new Foo() {}).toList()` the cast decides the
inferred type, and removing it does not compile.

The rule now uses the anonymous class type for the operand, so these
casts follow the same checks as casts of any other subtype.

Co-authored-by: ybai08 <271969568+ybai08@users.noreply.github.com>

20563 of 26686 branches covered (77.06%)

Branch coverage included in aggregate %.

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

43946 of 53902 relevant lines covered (81.53%)

0.82 hits per line

Jobs
ID Job ID Ran Files Coverage
1 909.1 29 Oct 2026 08:12AM UTC 2222
80.05
GitHub Action Run
Source Files on build 909
  • Tree
  • List 2222
  • Changed 3
  • Source Changed 3
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #909
  • 1f563e2d on github
  • Prev Build on main (#907)
  • Next Build on main (#911)
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