2020-06-30 12:47:33 +02:00
|
|
|
== Compliant Solution
|
|
|
|
|
2022-02-04 17:28:24 +01:00
|
|
|
[source,text]
|
2020-06-30 12:47:33 +02:00
|
|
|
----
|
|
|
|
public int lengthPlus(String str) {
|
|
|
|
int len = 2;
|
|
|
|
|
|
|
|
if (str != null) {
|
|
|
|
len += str.length();
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
log.info("argument was null");
|
|
|
|
}
|
|
|
|
return len;
|
|
|
|
}
|
|
|
|
----
|