Files
openide/java/java-impl/resources/inspectionDescriptions/OctalAndDecimalIntegersMixed.html
Leonid Shalupov 40795fe787 IJI-2422: community/java: move resources under resources root
GitOrigin-RevId: 8b2b63fc6db476ca0c2cfe5cadd84db6c4236d0f
2025-02-05 04:43:28 +00:00

16 lines
694 B
HTML

<html>
<body>
Reports mixed octal and decimal integer literals in a single array initializer.
This situation might happen when you copy a list of numbers into an array initializer.
Some numbers in the array might be zero-padded and the compiler will interpret them as octal.
<p><b>Example:</b></p>
<pre><code>int[] elapsed = {1, 13, 052};</code></pre>
<p>After the quick-fix that removes a leading zero is applied:</p>
<pre><code>int[] elapsed = {1, 13, 52};</code></pre>
<p>If it is an octal number (for example, after a variable inline), then you can use another quick-fix that converts octal to decimal:</p>
<code>int[] elapsed = {1, 13, 42};</code>
<!-- tooltip end -->
<p>
</body>
</html>