mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-04 17:20:55 +07:00
18 lines
853 B
HTML
18 lines
853 B
HTML
<html>
|
|
<body>
|
|
Reports explicit boxing, that is wrapping of primitive values in objects.
|
|
<p>Explicit manual boxing is unnecessary as of Java 5 and later, and can safely be removed.</p>
|
|
<p><b>Examples:</b></p>
|
|
<ul>
|
|
<li><code>Integer i = new Integer(1);</code> → <code>Integer i = Integer.valueOf(1);</code></li>
|
|
<li><code>int i = Integer.valueOf(1);</code> → <code>int i = 1;</code></li>
|
|
</ul>
|
|
|
|
<!-- tooltip end -->
|
|
<p>
|
|
Use the <b>Only report truly superfluously boxed expressions</b> option to report only truly superfluous boxing,
|
|
where a boxed value is immediately unboxed either implicitly or explicitly.
|
|
In this case, the entire boxing-unboxing step can be removed. The inspection doesn't report simple explicit boxing.
|
|
<p>This inspection only reports if the language level of the project or module is 5 or higher.</p>
|
|
</body>
|
|
</html> |