Polishing

This commit is contained in:
Juergen Hoeller
2017-01-12 23:30:38 +01:00
parent e19dff179e
commit 743ce2cda6
13 changed files with 44 additions and 28 deletions

View File

@@ -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 " +

View File

@@ -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);