Polishing
This commit is contained in:
@@ -541,10 +541,10 @@ public class MockHttpServletRequest implements HttpServletRequest {
|
||||
for (String key : params.keySet()) {
|
||||
Object value = params.get(key);
|
||||
if (value instanceof String) {
|
||||
this.addParameter(key, (String) value);
|
||||
addParameter(key, (String) value);
|
||||
}
|
||||
else if (value instanceof String[]) {
|
||||
this.addParameter(key, (String[]) value);
|
||||
addParameter(key, (String[]) value);
|
||||
}
|
||||
else {
|
||||
throw new IllegalArgumentException("Parameter map value must be single value " +
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -215,6 +215,7 @@ public class MockHttpServletResponse implements HttpServletResponse {
|
||||
return (int) this.contentLength;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setContentLengthLong(long contentLength) {
|
||||
this.contentLength = contentLength;
|
||||
doAddHeaderValue(CONTENT_LENGTH_HEADER, contentLength, true);
|
||||
|
||||
Reference in New Issue
Block a user