rspec/rules/S2225/java/rule.adoc

24 lines
348 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[]