rspec/rules/S4981/java/rule.adoc

24 lines
480 B
Plaintext

Using boxed type suggests that ``++null++`` is a possible value for the variable. Use of the primitive type should be preferred if this is not the case to avoid any confusion about possible values variable can contain.
== Noncompliant Code Example
----
Integer x = 5;
----
== Compliant Solution
----
int x = 5;
----
ifdef::env-github,rspecator-view[]
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]