shiro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fpa...@apache.org
Subject [shiro] branch master updated: SHIRO-705 - Update Easymock + Powermock
Date Mon, 17 Jun 2019 13:15:12 GMT
This is an automated email from the ASF dual-hosted git repository.

fpapon pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shiro.git


The following commit(s) were added to refs/heads/master by this push:
     new 4404aed  SHIRO-705 - Update Easymock + Powermock
     new acff0aa  Merge pull request #149 from coheigea/easymock
4404aed is described below

commit 4404aed75c67ab321d97dedb8186a67e4c516e0a
Author: Colm O hEigeartaigh <coheigea@apache.org>
AuthorDate: Mon Jun 17 11:57:30 2019 +0100

    SHIRO-705 - Update Easymock + Powermock
---
 pom.xml                                                               | 4 ++--
 .../src/test/java/org/apache/shiro/guice/BeanTypeListenerTest.java    | 2 +-
 .../test/java/org/apache/shiro/guice/web/SimpleFilterChainTest.java   | 4 ++--
 .../test/java/org/apache/shiro/guice/web/WebGuiceEnvironmentTest.java | 2 +-
 .../java/org/apache/shiro/web/session/HttpServletSessionTest.java     | 2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/pom.xml b/pom.xml
index c3c2771..bb155eb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -108,7 +108,7 @@
         <htmlunit.version>2.35.0</htmlunit.version>
 
         <!-- Test 3rd-party dependencies: -->
-        <easymock.version>3.4</easymock.version>
+        <easymock.version>4.0.2</easymock.version>
         <gmaven.version>1.5</gmaven.version>
         <groovy.version>2.4.7</groovy.version>
         <junit.version>4.12</junit.version>
@@ -117,7 +117,7 @@
         <taglib.standard.version>1.1.2</taglib.standard.version>
         <!-- so we can mock static methods in 3rd party libraries that sometimes don't
use proper interfaces
              ahem, hazelcast, ahem... -->
-        <powermock.version>1.6.6</powermock.version>
+        <powermock.version>2.0.2</powermock.version>
 
         <maven.compiler.source>${jdk.version}</maven.compiler.source>
         <maven.compiler.target>${jdk.version}</maven.compiler.target>
diff --git a/support/guice/src/test/java/org/apache/shiro/guice/BeanTypeListenerTest.java
b/support/guice/src/test/java/org/apache/shiro/guice/BeanTypeListenerTest.java
index 5b189d6..b934431 100644
--- a/support/guice/src/test/java/org/apache/shiro/guice/BeanTypeListenerTest.java
+++ b/support/guice/src/test/java/org/apache/shiro/guice/BeanTypeListenerTest.java
@@ -74,7 +74,7 @@ public class BeanTypeListenerTest {
 
         expect(injectorProvider.get()).andReturn(injector).anyTimes();
 
-        Capture<MembersInjector<SomeInjectableBean>> capture = new Capture<MembersInjector<SomeInjectableBean>>();
+        Capture<MembersInjector<SomeInjectableBean>> capture = Capture.newInstance();
         encounter.register(and(anyObject(MembersInjector.class), capture(capture)));
 
         SecurityManager securityManager = control.createMock(SecurityManager.class);
diff --git a/support/guice/src/test/java/org/apache/shiro/guice/web/SimpleFilterChainTest.java
b/support/guice/src/test/java/org/apache/shiro/guice/web/SimpleFilterChainTest.java
index 77bea50..1ae4ca5 100644
--- a/support/guice/src/test/java/org/apache/shiro/guice/web/SimpleFilterChainTest.java
+++ b/support/guice/src/test/java/org/apache/shiro/guice/web/SimpleFilterChainTest.java
@@ -47,8 +47,8 @@ public class SimpleFilterChainTest {
         ServletRequest request = ctrl.createMock(ServletRequest.class);
         ServletResponse response = ctrl.createMock(ServletResponse.class);
 
-        Capture<FilterChain> fc1 = new Capture<FilterChain>();
-        Capture<FilterChain> fc2 = new Capture<FilterChain>();
+        Capture<FilterChain> fc1 = Capture.newInstance();
+        Capture<FilterChain> fc2 = Capture.newInstance();
         filter1.doFilter(same(request), same(response), and(anyObject(FilterChain.class),
capture(fc1)));
         filter2.doFilter(same(request), same(response), and(anyObject(FilterChain.class),
capture(fc2)));
         originalChain.doFilter(request, response);
diff --git a/support/guice/src/test/java/org/apache/shiro/guice/web/WebGuiceEnvironmentTest.java
b/support/guice/src/test/java/org/apache/shiro/guice/web/WebGuiceEnvironmentTest.java
index 22913ad..77fada3 100644
--- a/support/guice/src/test/java/org/apache/shiro/guice/web/WebGuiceEnvironmentTest.java
+++ b/support/guice/src/test/java/org/apache/shiro/guice/web/WebGuiceEnvironmentTest.java
@@ -48,7 +48,7 @@ public class WebGuiceEnvironmentTest {
         FilterChainResolver filterChainResolver = createMock(FilterChainResolver.class);
         ServletContext servletContext = createMock(ServletContext.class);
 
-        Capture<WebGuiceEnvironment> capture = new Capture<WebGuiceEnvironment>();
+        Capture<WebGuiceEnvironment> capture = Capture.newInstance();
         servletContext.setAttribute(eq(EnvironmentLoaderListener.ENVIRONMENT_ATTRIBUTE_KEY),
and(anyObject(WebGuiceEnvironment.class), capture(capture)));
 
         replay(servletContext, securityManager, filterChainResolver);
diff --git a/web/src/test/java/org/apache/shiro/web/session/HttpServletSessionTest.java b/web/src/test/java/org/apache/shiro/web/session/HttpServletSessionTest.java
index 0d2cb77..3677683 100644
--- a/web/src/test/java/org/apache/shiro/web/session/HttpServletSessionTest.java
+++ b/web/src/test/java/org/apache/shiro/web/session/HttpServletSessionTest.java
@@ -46,7 +46,7 @@ public class HttpServletSessionTest {
         final int expectedTimeoutInSeconds = 30 * 24 * 60 * 60;  // 30 days.
         final long expectedLongValue = expectedTimeoutInSeconds * 1000L;
 
-        Capture<Integer> capturedInt = new Capture<Integer>();
+        Capture<Integer> capturedInt = Capture.newInstance();
         // use a capture to make sure the setter is doing the right thing.
         mockSession.setMaxInactiveInterval(captureInt(capturedInt));
         expect(mockSession.getMaxInactiveInterval()).andReturn(expectedTimeoutInSeconds);


Mime
View raw message