Skip to content

Commit 61ac117

Browse files
committed
remove @NotNull annotation
1 parent 328dc56 commit 61ac117

File tree

1 file changed

+6
-16
lines changed

1 file changed

+6
-16
lines changed

core/src/main/java/cn/vika/core/http/HttpHeader.java

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030

3131
import cn.vika.core.utils.AssertUtil;
3232
import cn.vika.core.utils.StringUtil;
33-
import org.jetbrains.annotations.NotNull;
3433

3534
/**
3635
* A data structure representing HTTP request or response headers,
@@ -214,19 +213,16 @@ public void clear() {
214213
this.headers.clear();
215214
}
216215

217-
@NotNull
218216
@Override
219217
public Set<String> keySet() {
220218
return this.headers.keySet();
221219
}
222220

223-
@NotNull
224221
@Override
225222
public Collection<List<String>> values() {
226223
return this.headers.values();
227224
}
228225

229-
@NotNull
230226
@Override
231227
public Set<Entry<String, List<String>>> entrySet() {
232228
return this.headers.entrySet();
@@ -272,21 +268,15 @@ public static String formatHeaders(Map<String, List<String>> headers) {
272268
}
273269

274270
public static String buildContentDisposition(String type, String name) {
275-
StringBuilder sb = new StringBuilder();
276-
sb.append(type);
277-
sb.append("; name=\"");
278-
sb.append(name).append('\"');
279-
return sb.toString();
271+
return type + "; name=\"" + name + '\"';
280272
}
281273

282274
public static String buildContentDisposition(String type, String name, String filename) {
283-
StringBuilder sb = new StringBuilder();
284-
sb.append(type);
285-
sb.append("; name=\"");
286-
sb.append(name).append('\"');
287-
sb.append("; filename=\"");
288-
sb.append(quoteFilename(filename)).append('\"');
289-
return sb.toString();
275+
return type
276+
+ "; name=\""
277+
+ name + '\"'
278+
+ "; filename=\""
279+
+ quoteFilename(filename) + '\"';
290280
}
291281

292282
private static String quoteFilename(String filename) {

0 commit comments

Comments
 (0)