A RetroSearch Logo

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

Search Query:

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

[java] AvoidUsingOctalValues triggers on non-octal double literals with a leading 0 · Issue #5007 · pmd/pmd · GitHub

Affects PMD Version: 7.1.0

Rule: AvoidUsingOctalValues

Description:

When a double literal has a leading 0, and ends with either d or .0, the literal is not treated as an octal value. However, PMD still reports a violation.

Code Sample demonstrating the issue:

double literal1 = 017.0; // Not octal!
double literal2 = 017d; // Also not octal!
double octal = 017; // Definitely octal!

Expected outcome:

PMD should only report a violation at line 3 only, but it reports on all three.

Running PMD through: Gradle


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