Skip to content

Commit c7e7d11

Browse files
committed
Polishing
1 parent d501137 commit c7e7d11

File tree

3 files changed

+84
-97
lines changed

3 files changed

+84
-97
lines changed

spring-core/src/main/java/org/springframework/util/MimeType.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public class MimeType implements Comparable<MimeType>, Serializable {
6464
static {
6565
// variable names refer to RFC 2616, section 2.2
6666
BitSet ctl = new BitSet(128);
67-
for (int i=0; i <= 31; i++) {
67+
for (int i = 0; i <= 31; i++) {
6868
ctl.set(i);
6969
}
7070
ctl.set(127);
@@ -155,14 +155,14 @@ public MimeType(String type, String subtype, Map<String, String> parameters) {
155155
this.type = type.toLowerCase(Locale.ENGLISH);
156156
this.subtype = subtype.toLowerCase(Locale.ENGLISH);
157157
if (!CollectionUtils.isEmpty(parameters)) {
158-
Map<String, String> m = new LinkedCaseInsensitiveMap<String>(parameters.size(), Locale.ENGLISH);
158+
Map<String, String> map = new LinkedCaseInsensitiveMap<String>(parameters.size(), Locale.ENGLISH);
159159
for (Map.Entry<String, String> entry : parameters.entrySet()) {
160160
String attribute = entry.getKey();
161161
String value = entry.getValue();
162162
checkParameters(attribute, value);
163-
m.put(attribute, value);
163+
map.put(attribute, value);
164164
}
165-
this.parameters = Collections.unmodifiableMap(m);
165+
this.parameters = Collections.unmodifiableMap(map);
166166
}
167167
else {
168168
this.parameters = Collections.emptyMap();
@@ -256,7 +256,7 @@ public String getSubtype() {
256256

257257
/**
258258
* Return the character set, as indicated by a {@code charset} parameter, if any.
259-
* @return the character set; or {@code null} if not available
259+
* @return the character set, or {@code null} if not available
260260
*/
261261
public Charset getCharSet() {
262262
String charSet = getParameter(PARAM_CHARSET);
@@ -266,18 +266,18 @@ public Charset getCharSet() {
266266
/**
267267
* Return a generic parameter value, given a parameter name.
268268
* @param name the parameter name
269-
* @return the parameter value; or {@code null} if not present
269+
* @return the parameter value, or {@code null} if not present
270270
*/
271271
public String getParameter(String name) {
272272
return this.parameters.get(name);
273273
}
274274

275275
/**
276276
* Return all generic parameter values.
277-
* @return a read-only map, possibly empty, never {@code null}
277+
* @return a read-only map (possibly empty, never {@code null})
278278
*/
279279
public Map<String, String> getParameters() {
280-
return parameters;
280+
return this.parameters;
281281
}
282282

283283
/**

0 commit comments

Comments
 (0)