Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ public class AwsProxyRequest {

@JsonIgnore
public String getQueryString() {
String params = "";
StringBuilder params = new StringBuilder("");

if (this.getQueryStringParameters() != null && this.getQueryStringParameters().size() > 0) {
for (String key : this.getQueryStringParameters().keySet()) {
String separator = params.equals("") ? "?" : "&";
String separator = params.length() == 0 ? "?" : "&";

params += separator + key + "=" + this.getQueryStringParameters().get(key);
params.append(separator + key + "=" + this.getQueryStringParameters().get(key));
}
}

return params;
return params.toString();
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,17 +420,17 @@ public void setCharacterEncoding(String s) throws UnsupportedEncodingException {

if (currentContentType.contains(HEADER_VALUE_SEPARATOR)) {
String[] contentTypeValues = currentContentType.split(HEADER_VALUE_SEPARATOR);
String contentType = contentTypeValues[0];
StringBuilder contentType = new StringBuilder(contentTypeValues[0]);

for (String contentTypeValue : contentTypeValues) {
if (contentTypeValue.trim().startsWith(ENCODING_VALUE_KEY)) {
contentType += HEADER_VALUE_SEPARATOR + " " + ENCODING_VALUE_KEY + HEADER_KEY_VALUE_SEPARATOR + s;
contentType.append(HEADER_VALUE_SEPARATOR + " " + ENCODING_VALUE_KEY + HEADER_KEY_VALUE_SEPARATOR + s);
} else {
contentType += HEADER_VALUE_SEPARATOR + " " + contentTypeValue;
contentType.append(HEADER_VALUE_SEPARATOR + " " + contentTypeValue);
}
}

request.getHeaders().put(HttpHeaders.CONTENT_TYPE, contentType);
request.getHeaders().put(HttpHeaders.CONTENT_TYPE, contentType.toString());
} else {
request.getHeaders().put(
HttpHeaders.CONTENT_TYPE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private void notifyStartListeners(ServletContext context) {
* Default configuration class for the DispatcherServlet. This just mocks the behaviour of a default
* ServletConfig object with no init parameters
*/
private class DefaultDispatcherConfig implements ServletConfig {
private static class DefaultDispatcherConfig implements ServletConfig {
private ServletContext servletContext;

DefaultDispatcherConfig(ServletContext context) {
Expand Down