Browse Source

Polishing

pull/1482/head
Juergen Hoeller 9 years ago
parent
commit
6d6d772f31
  1. 1
      spring-aop/src/main/java/org/springframework/aop/config/SimpleBeanFactoryAwareAspectInstanceFactory.java
  2. 8
      spring-jdbc/src/main/java/org/springframework/jdbc/core/simple/AbstractJdbcInsert.java
  3. 3
      spring-web/src/main/java/org/springframework/http/client/support/AsyncHttpAccessor.java
  4. 2
      spring-web/src/main/java/org/springframework/web/context/support/LiveBeansViewServlet.java
  5. 10
      spring-web/src/test/java/org/springframework/web/filter/RelativeRedirectFilterTests.java

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

@ -24,7 +24,6 @@ import org.springframework.core.Ordered; @@ -24,7 +24,6 @@ import org.springframework.core.Ordered;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.ClassUtils;
import org.springframework.util.StringUtils;
/**
* Implementation of {@link AspectInstanceFactory} that locates the aspect from the

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

@ -81,12 +81,10 @@ public abstract class AbstractJdbcInsert { @@ -81,12 +81,10 @@ public abstract class AbstractJdbcInsert {
private volatile boolean compiled = false;
/** The generated string used for insert statement */
@Nullable
private String insertString;
private String insertString = "";
/** The SQL type information for the insert columns */
@Nullable
private int[] insertTypes;
private int[] insertTypes = new int[0];
/**
@ -224,7 +222,6 @@ public abstract class AbstractJdbcInsert { @@ -224,7 +222,6 @@ public abstract class AbstractJdbcInsert {
/**
* Get the insert string to be used.
*/
@Nullable
public String getInsertString() {
return this.insertString;
}
@ -232,7 +229,6 @@ public abstract class AbstractJdbcInsert { @@ -232,7 +229,6 @@ public abstract class AbstractJdbcInsert {
/**
* Get the array of {@link java.sql.Types} to be used for insert.
*/
@Nullable
public int[] getInsertTypes() {
return this.insertTypes;
}

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

@ -29,7 +29,8 @@ import org.springframework.util.Assert; @@ -29,7 +29,8 @@ import org.springframework.util.Assert;
/**
* Base class for {@link org.springframework.web.client.AsyncRestTemplate}
* and other HTTP accessing gateway helpers, defining common properties
* such as the {@link org.springframework.http.client.AsyncClientHttpRequestFactory} to operate on.
* such as the {@link org.springframework.http.client.AsyncClientHttpRequestFactory}
* to operate on.
*
* <p>Not intended to be used directly. See
* {@link org.springframework.web.client.AsyncRestTemplate}.

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

@ -57,7 +57,7 @@ public class LiveBeansViewServlet extends HttpServlet { @@ -57,7 +57,7 @@ public class LiveBeansViewServlet extends HttpServlet {
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
Assert.state(this.liveBeansView != null, "No LiveBeanViews available");
Assert.state(this.liveBeansView != null, "No LiveBeansView available");
String content = this.liveBeansView.getSnapshotAsJson();
response.setContentType("application/json");
response.setContentLength(content.length());

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

@ -20,11 +20,8 @@ import javax.servlet.http.HttpServletResponse; @@ -20,11 +20,8 @@ import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InOrder;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.junit.MockitoJUnitRunner;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
@ -38,14 +35,13 @@ import static org.junit.Assert.*; @@ -38,14 +35,13 @@ import static org.junit.Assert.*;
* Unit tests for {@link RelativeRedirectFilter}.
*
* @author Rob Winch
* @author Juergen Hoeller
*/
@RunWith(MockitoJUnitRunner.class)
public class RelativeRedirectFilterTests {
@Mock
HttpServletResponse response;
private RelativeRedirectFilter filter = new RelativeRedirectFilter();
RelativeRedirectFilter filter = new RelativeRedirectFilter();
private HttpServletResponse response = Mockito.mock(HttpServletResponse.class);
@Test(expected = IllegalArgumentException.class)

Loading…
Cancel
Save