A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/2546 below:

[java] DuplicateImports reported for the same import... and import static... · Issue #2546 · pmd/pmd · GitHub

Affects PMD Version: 6.24.0

Rule: DuplicateImports

Description:

Violation of DuplicateImports reported for (star) imports of types and statics from other class.

Code Sample demonstrating the issue:
https://github.com/pzrep/pmd-DuplicateImports

import charles.X.*;
import static charles.X.*;

is reported as violation, although they import different things, and one does not replace another.

Expected outcome:

No violation of DuplicateImports reported.

I think so.

* Is PMD missing to report a violation, where there should be one? -> false-negative
No.

Running PMD through: CLI in sample, found with maven.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4