Fix warnings
This commit is contained in:
@@ -20,7 +20,6 @@ import javax.el.ExpressionFactory;
|
||||
import javax.el.ValueExpression;
|
||||
import javax.faces.context.FacesContext;
|
||||
|
||||
import org.springframework.expression.AccessException;
|
||||
import org.springframework.expression.EvaluationContext;
|
||||
import org.springframework.expression.PropertyAccessor;
|
||||
import org.springframework.expression.TypedValue;
|
||||
|
||||
@@ -83,7 +83,7 @@ public class FlowActionListenerTests extends TestCase {
|
||||
return String.class;
|
||||
}
|
||||
|
||||
public Object invoke(FacesContext context, Object... args) throws EvaluationException {
|
||||
public Object invoke(FacesContext context, Object[] args) throws EvaluationException {
|
||||
return this.result;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,15 +16,18 @@ public class FlowResponseStateManagerTests extends TestCase {
|
||||
|
||||
private final JSFMockHelper jsfMock = new JSFMockHelper();
|
||||
|
||||
private StaticWebApplicationContext webappContext;
|
||||
|
||||
private FlowResponseStateManager responseStateManager;
|
||||
|
||||
private RequestContext requestContext;
|
||||
private FlowExecutionContext flowExecutionContext;
|
||||
|
||||
|
||||
protected void setUp() throws Exception {
|
||||
this.jsfMock.setUp();
|
||||
StaticWebApplicationContext webappContext = new StaticWebApplicationContext();
|
||||
webappContext.setServletContext(this.jsfMock.servletContext());
|
||||
this.webappContext = new StaticWebApplicationContext();
|
||||
this.webappContext.setServletContext(this.jsfMock.servletContext());
|
||||
|
||||
this.requestContext = EasyMock.createMock(RequestContext.class);
|
||||
RequestContextHolder.setRequestContext(this.requestContext);
|
||||
@@ -35,6 +38,7 @@ public class FlowResponseStateManagerTests extends TestCase {
|
||||
|
||||
protected void tearDown() throws Exception {
|
||||
super.tearDown();
|
||||
this.webappContext.close();
|
||||
this.jsfMock.tearDown();
|
||||
RequestContextHolder.setRequestContext(null);
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ public class JsfManagedBeanAwareELExpressionParserTests extends TestCase {
|
||||
RequestContextHolder.setRequestContext(null);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void testGetJSFBean() {
|
||||
this.jsfMock.externalContext().getRequestMap().put("myJsfBean", new Object());
|
||||
Expression expr = this.parser.parseExpression("myJsfBean", new FluentParserContext().evaluate(RequestContext.class));
|
||||
|
||||
@@ -41,11 +41,13 @@ public class JsfManagedBeanPropertyAccessorTests extends TestCase {
|
||||
RequestContextHolder.setRequestContext(null);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void testCanRead() {
|
||||
this.jsfMock.externalContext().getRequestMap().put("myJsfBean", new Object());
|
||||
assertTrue(this.accessor.canRead(null, null, "myJsfBean"));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public void testRead() {
|
||||
Object jsfBean = new Object();
|
||||
this.jsfMock.externalContext().getRequestMap().put("myJsfBean", jsfBean);
|
||||
|
||||
@@ -159,7 +159,7 @@ public class JsfViewFactoryTests extends TestCase {
|
||||
/**
|
||||
* View already exists in view/flash scope and must be restored and the lifecycle executed, no flow event signaled
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
@SuppressWarnings({ "deprecation", "unchecked" })
|
||||
public final void testGetView_RestoreWithBindings() {
|
||||
|
||||
this.lifecycle = new NoExecutionLifecycle(this.jsfMock.lifecycle());
|
||||
|
||||
@@ -141,7 +141,7 @@ public class MockApplication extends Application {
|
||||
return null;
|
||||
}
|
||||
|
||||
public MethodBinding createMethodBinding(String ref, Class<?>... params) throws ReferenceSyntaxException {
|
||||
public MethodBinding createMethodBinding(String ref, Class<?>[] params) throws ReferenceSyntaxException {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ package org.springframework.faces.webflow;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.security.Principal;
|
||||
import java.util.Collections;
|
||||
|
||||
Reference in New Issue
Block a user