Simplify if/else.
This commit is contained in:
parent
400771a1a7
commit
956b8194ff
|
@ -84,10 +84,8 @@ public final class SimpleBody {
|
|||
if (bodyAsBytes != null) {
|
||||
final Charset charset = (contentType != null ? contentType : ContentType.DEFAULT_TEXT).getCharset();
|
||||
return new String(bodyAsBytes, charset != null ? charset : StandardCharsets.US_ASCII);
|
||||
} else if (bodyAsText != null) {
|
||||
return bodyAsText;
|
||||
} else {
|
||||
return null;
|
||||
return bodyAsText;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue