Skip to content

Commit

Permalink
Remove parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
franz1981 committed May 31, 2023
1 parent e1cd392 commit 7be2371
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,10 +267,10 @@ private static String parseCharset(String mimeType) {
if (charsetLen == 0) {
return null;
}
return charsetOf(mimeType, charsetValueStart, charsetValueEnd, charsetLen);
return charsetOf(mimeType, charsetValueStart, charsetLen);
}

private static String charsetOf(String mimeType, int charsetValueStart, int charsetValueEnd, int charsetLen) {
private static String charsetOf(String mimeType, int charsetValueStart, int charsetLen) {
switch (charsetLen) {
case 5:
if (mimeType.regionMatches(charsetValueStart, "utf-8", 0, 5)) {
Expand All @@ -283,7 +283,7 @@ private static String charsetOf(String mimeType, int charsetValueStart, int char
}
break;
}
return mimeType.substring(charsetValueStart, charsetValueEnd);
return mimeType.substring(charsetValueStart, charsetValueStart + charsetLen);
}

private static String getCharset(String mimeType) {
Expand Down

0 comments on commit 7be2371

Please sign in to comment.