Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb3d20b1

Browse files
committed
Backport minor MultipartUtils:: computeContentType clean up
Motivation:5b0e807 introduced a minor clean up on`MultipartUtils:: computeContentType `.Modification:Backport codeResult:Code aligned
1 parent26e7372 commitb3d20b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎client/src/main/java/org/asynchttpclient/request/body/multipart/MultipartUtils.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ private static byte[] generateBoundary() {
104104
returnbytes;
105105
}
106106

107-
privatestaticStringcomputeContentType(Stringbase,byte[]boundary) {
107+
privatestaticStringcomputeContentType(CharSequencebase,byte[]boundary) {
108108
StringBuilderbuffer =StringUtils.stringBuilder().append(base);
109-
if (!base.endsWith(";"))
109+
if (base.length() !=0 &&base.charAt(base.length() -1) !=';')
110110
buffer.append(';');
111111
returnbuffer.append(" boundary=").append(newString(boundary,US_ASCII)).toString();
112112
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp