Skip to content

Commit 6d6d772

Browse files
committed
Polishing
1 parent 378c72e commit 6d6d772

File tree

5 files changed

+8
-16
lines changed

5 files changed

+8
-16
lines changed

spring-aop/src/main/java/org/springframework/aop/config/SimpleBeanFactoryAwareAspectInstanceFactory.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
import org.springframework.lang.Nullable;
2525
import org.springframework.util.Assert;
2626
import org.springframework.util.ClassUtils;
27-
import org.springframework.util.StringUtils;
2827

2928
/**
3029
* Implementation of {@link AspectInstanceFactory} that locates the aspect from the

spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcInsert.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,10 @@ public abstract class AbstractJdbcInsert {
8181
private volatile boolean compiled = false;
8282

8383
/** The generated string used for insert statement */
84-
@Nullable
85-
private String insertString;
84+
private String insertString = "";
8685

8786
/** The SQL type information for the insert columns */
88-
@Nullable
89-
private int[] insertTypes;
87+
private int[] insertTypes = new int[0];
9088

9189

9290
/**
@@ -224,15 +222,13 @@ public void setOverrideIncludeSynonymsDefault(boolean override) {
224222
/**
225223
* Get the insert string to be used.
226224
*/
227-
@Nullable
228225
public String getInsertString() {
229226
return this.insertString;
230227
}
231228

232229
/**
233230
* Get the array of {@link java.sql.Types} to be used for insert.
234231
*/
235-
@Nullable
236232
public int[] getInsertTypes() {
237233
return this.insertTypes;
238234
}

spring-web/src/main/java/org/springframework/http/client/support/AsyncHttpAccessor.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
/**
3030
* Base class for {@link org.springframework.web.client.AsyncRestTemplate}
3131
* and other HTTP accessing gateway helpers, defining common properties
32-
* such as the {@link org.springframework.http.client.AsyncClientHttpRequestFactory} to operate on.
32+
* such as the {@link org.springframework.http.client.AsyncClientHttpRequestFactory}
33+
* to operate on.
3334
*
3435
* <p>Not intended to be used directly. See
3536
* {@link org.springframework.web.client.AsyncRestTemplate}.

spring-web/src/main/java/org/springframework/web/context/support/LiveBeansViewServlet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ protected LiveBeansView buildLiveBeansView() {
5757
protected void doGet(HttpServletRequest request, HttpServletResponse response)
5858
throws ServletException, IOException {
5959

60-
Assert.state(this.liveBeansView != null, "No LiveBeanViews available");
60+
Assert.state(this.liveBeansView != null, "No LiveBeansView available");
6161
String content = this.liveBeansView.getSnapshotAsJson();
6262
response.setContentType("application/json");
6363
response.setContentLength(content.length());

spring-web/src/test/java/org/springframework/web/filter/RelativeRedirectFilterTests.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,8 @@
2020
import javax.servlet.http.HttpServletResponseWrapper;
2121

2222
import org.junit.Test;
23-
import org.junit.runner.RunWith;
2423
import org.mockito.InOrder;
25-
import org.mockito.Mock;
2624
import org.mockito.Mockito;
27-
import org.mockito.junit.MockitoJUnitRunner;
2825

2926
import org.springframework.http.HttpHeaders;
3027
import org.springframework.http.HttpStatus;
@@ -38,14 +35,13 @@
3835
* Unit tests for {@link RelativeRedirectFilter}.
3936
*
4037
* @author Rob Winch
38+
* @author Juergen Hoeller
4139
*/
42-
@RunWith(MockitoJUnitRunner.class)
4340
public class RelativeRedirectFilterTests {
4441

45-
@Mock
46-
HttpServletResponse response;
42+
private RelativeRedirectFilter filter = new RelativeRedirectFilter();
4743

48-
RelativeRedirectFilter filter = new RelativeRedirectFilter();
44+
private HttpServletResponse response = Mockito.mock(HttpServletResponse.class);
4945

5046

5147
@Test(expected = IllegalArgumentException.class)

0 commit comments

Comments
 (0)