Merge branch 'cleanup-3.2.x' into 3.2.x
* cleanup-3.2.x: Fix unnecessary @SupressWarnings annotations Fix Javadoc warnings Fix unused local variable warnings Fix unused type compiler warnings Fix 'is already an instance of type' warnings
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2013 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.
|
||||
@@ -81,7 +81,7 @@ public class StreamingSimpleHttpRequestFactoryTests extends AbstractHttpRequestF
|
||||
ClientHttpRequest request = factory.createRequest(new URI(baseUrl + "/methods/post"), HttpMethod.POST);
|
||||
final int BUF_SIZE = 4096;
|
||||
final int ITERATIONS = Integer.MAX_VALUE / BUF_SIZE;
|
||||
final int contentLength = ITERATIONS * BUF_SIZE;
|
||||
// final int contentLength = ITERATIONS * BUF_SIZE;
|
||||
// request.getHeaders().setContentLength(contentLength);
|
||||
OutputStream body = request.getBody();
|
||||
for (int i = 0; i < ITERATIONS; i++) {
|
||||
|
||||
@@ -72,7 +72,6 @@ public class FormHttpMessageConverterTests {
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("unchecked")
|
||||
public void readForm() throws Exception {
|
||||
String body = "name+1=value+1&name+2=value+2%2B1&name+2=value+2%2B2&name+3";
|
||||
Charset iso88591 = Charset.forName("ISO-8859-1");
|
||||
|
||||
@@ -140,29 +140,25 @@ public class InitBinderDataBinderFactoryTests {
|
||||
|
||||
private static class InitBinderHandler {
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@InitBinder
|
||||
public void initBinder(WebDataBinder dataBinder) {
|
||||
dataBinder.setDisallowedFields("id");
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@InitBinder(value="foo")
|
||||
public void initBinderWithAttributeName(WebDataBinder dataBinder) {
|
||||
dataBinder.setDisallowedFields("id");
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@InitBinder
|
||||
public String initBinderReturnValue(WebDataBinder dataBinder) {
|
||||
return "invalid";
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@InitBinder
|
||||
public void initBinderTypeConversion(WebDataBinder dataBinder, @RequestParam int requestParam) {
|
||||
dataBinder.setDisallowedFields("requestParam-" + requestParam);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -299,7 +299,6 @@ public class ModelAttributeMethodProcessorTests {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
@ModelAttribute("modelAttrName")
|
||||
private String annotatedReturnValue() {
|
||||
return null;
|
||||
@@ -310,4 +309,4 @@ public class ModelAttributeMethodProcessorTests {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2013 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.
|
||||
@@ -465,19 +465,11 @@ public class CommonsMultipartResolverTests {
|
||||
this.writtenFile = file;
|
||||
}
|
||||
|
||||
public File getWrittenFile() {
|
||||
return writtenFile;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void delete() {
|
||||
this.deleted = true;
|
||||
}
|
||||
|
||||
public boolean isDeleted() {
|
||||
return deleted;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getFieldName() {
|
||||
return fieldName;
|
||||
|
||||
Reference in New Issue
Block a user