Skip to content
Permalink
Browse files
Simplify if/else.
  • Loading branch information
garydgregory committed Nov 24, 2020
1 parent 400771a commit 956b8194ff792d07fbcf01853f18126dcf9e8264
Showing 1 changed file with 1 addition and 3 deletions.
@@ -84,10 +84,8 @@ public String getBodyText() {
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;
}
}

0 comments on commit 956b819

Please sign in to comment.