rspec/rules/S2225/java/rule.adoc

31 lines
486 B
Plaintext
Raw Normal View History

2020-06-30 12:48:07 +02:00
include::../description.adoc[]
== Noncompliant Code Example
----
public String toString () {
if (this.collection.isEmpty()) {
return null; // Noncompliant
} else {
// ...
----
== Compliant Solution
----
public String toString () {
if (this.collection.isEmpty()) {
return "";
} else {
// ...
----
include::../see.adoc[]
ifdef::rspecator-view[]
== Comments And Links
(visible only on this page)
include::../comments-and-links.adoc[]
endif::rspecator-view[]