rspec/rules/S2225/java/rule.adoc
2020-06-30 17:16:12 +02:00

24 lines
348 B
Plaintext

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[]