Repository: logging-log4j2
Updated Branches:
  refs/heads/master a202ab08b -> 0d20cea8e


Replace deprecated EasyMock usage.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/0d20cea8
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/0d20cea8
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/0d20cea8

Branch: refs/heads/master
Commit: 0d20cea8eee0edd25e329a811a165f7c032d8534
Parents: a202ab0
Author: ggregory <[email protected]>
Authored: Sun Aug 9 17:41:38 2015 -0700
Committer: ggregory <[email protected]>
Committed: Sun Aug 9 17:41:38 2015 -0700

----------------------------------------------------------------------
 .../web/Log4jServletContainerInitializerTest.java  |  4 ++--
 .../log4j/web/Log4jWebInitializerImplTest.java     | 17 +++++++++--------
 2 files changed, 11 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/0d20cea8/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jServletContainerInitializerTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jServletContainerInitializerTest.java
 
b/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jServletContainerInitializerTest.java
index e0ecac9..a4e6a6c 100644
--- 
a/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jServletContainerInitializerTest.java
+++ 
b/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jServletContainerInitializerTest.java
@@ -141,7 +141,7 @@ public class Log4jServletContainerInitializerTest {
 
     @Test
     public void testOnStartupCanceledDueToPreExistingFilter() throws Exception 
{
-        final Capture<Class<? extends Filter>> filterCapture = new Capture<>();
+        final Capture<Class<? extends Filter>> filterCapture = 
EasyMock.newCapture();
 
         expect(this.servletContext.getMajorVersion()).andReturn(3);
         expect(this.servletContext.getEffectiveMajorVersion()).andReturn(3);
@@ -161,7 +161,7 @@ public class Log4jServletContainerInitializerTest {
     public void testOnStartupFailedDueToInitializerFailure() throws Exception {
         final FilterRegistration.Dynamic registration = 
createStrictMock(FilterRegistration.Dynamic.class);
 
-        final Capture<Class<? extends Filter>> filterCapture = new Capture<>();
+        final Capture<Class<? extends Filter>> filterCapture = 
EasyMock.newCapture();
         final IllegalStateException exception = new 
IllegalStateException(Strings.EMPTY);
 
         expect(this.servletContext.getMajorVersion()).andReturn(3);

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/0d20cea8/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jWebInitializerImplTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jWebInitializerImplTest.java
 
b/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jWebInitializerImplTest.java
index 5f68412..9e2e75a 100644
--- 
a/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jWebInitializerImplTest.java
+++ 
b/log4j-web/src/test/java/org/apache/logging/log4j/web/Log4jWebInitializerImplTest.java
@@ -21,6 +21,7 @@ import javax.servlet.ServletContext;
 import org.apache.logging.log4j.core.LoggerContext;
 import org.apache.logging.log4j.core.impl.ContextAnchor;
 import org.easymock.Capture;
+import org.easymock.EasyMock;
 import org.easymock.IAnswer;
 import org.junit.After;
 import org.junit.Before;
@@ -43,7 +44,7 @@ public class Log4jWebInitializerImplTest {
 
     @Before
     public void setUp() {
-        final Capture<Log4jWebLifeCycle> initializerCapture = new Capture<>();
+        final Capture<Log4jWebLifeCycle> initializerCapture = 
EasyMock.newCapture();
 
         this.servletContext = createStrictMock(ServletContext.class);
         
expect(this.servletContext.getAttribute(Log4jWebSupport.SUPPORT_ATTRIBUTE)).andReturn(null);
@@ -104,7 +105,7 @@ public class Log4jWebInitializerImplTest {
 
     @Test
     public void 
testInitializeWithNoParametersThenSetLoggerContextThenDeinitialize() throws 
Exception {
-        final Capture<Object> loggerContextCapture = new Capture<>();
+        final Capture<Object> loggerContextCapture = EasyMock.newCapture();
 
         
expect(this.servletContext.getInitParameter(Log4jWebSupport.LOG4J_CONTEXT_NAME)).andReturn(null);
         
expect(this.servletContext.getInitParameter(Log4jWebSupport.LOG4J_CONFIG_LOCATION)).andReturn(null);
@@ -166,7 +167,7 @@ public class Log4jWebInitializerImplTest {
 
     @Test
     public void 
testInitializeWithClassLoaderNoParametersThenSetLoggerContextThenDeinitialize() 
throws Exception {
-        final Capture<Object> loggerContextCapture = new Capture<>();
+        final Capture<Object> loggerContextCapture = EasyMock.newCapture();
 
         
expect(this.servletContext.getInitParameter(Log4jWebSupport.LOG4J_CONTEXT_NAME)).andReturn(null);
         
expect(this.servletContext.getInitParameter(Log4jWebSupport.LOG4J_CONFIG_LOCATION)).andReturn(null);
@@ -229,7 +230,7 @@ public class Log4jWebInitializerImplTest {
 
     @Test
     public void testInitializeIsIdempotent() throws Exception {
-        final Capture<Object> loggerContextCapture = new Capture<>();
+        final Capture<Object> loggerContextCapture = EasyMock.newCapture();
 
         
expect(this.servletContext.getInitParameter(Log4jWebSupport.LOG4J_CONTEXT_NAME)).andReturn(null);
         
expect(this.servletContext.getInitParameter(Log4jWebSupport.LOG4J_CONFIG_LOCATION)).andReturn(null);
@@ -272,7 +273,7 @@ public class Log4jWebInitializerImplTest {
 
     @Test
     public void testInitializeFailsAfterDeinitialize() throws Exception {
-        final Capture<Object> loggerContextCapture = new Capture<>();
+        final Capture<Object> loggerContextCapture = EasyMock.newCapture();
 
         
expect(this.servletContext.getInitParameter(Log4jWebSupport.LOG4J_CONTEXT_NAME)).andReturn(null);
         
expect(this.servletContext.getInitParameter(Log4jWebSupport.LOG4J_CONFIG_LOCATION)).andReturn(null);
@@ -314,7 +315,7 @@ public class Log4jWebInitializerImplTest {
 
     @Test
     public void testDeinitializeIsIdempotent() throws Exception {
-        final Capture<Object> loggerContextCapture = new Capture<>();
+        final Capture<Object> loggerContextCapture = EasyMock.newCapture();
 
         
expect(this.servletContext.getInitParameter(Log4jWebSupport.LOG4J_CONTEXT_NAME)).andReturn(null);
         
expect(this.servletContext.getInitParameter(Log4jWebSupport.LOG4J_CONFIG_LOCATION)).andReturn(null);
@@ -370,7 +371,7 @@ public class Log4jWebInitializerImplTest {
 
     @Test
     public void testInitializeUsingJndiSelector() throws Exception {
-        final Capture<Object> loggerContextCapture = new Capture<>();
+        final Capture<Object> loggerContextCapture = EasyMock.newCapture();
 
         
expect(this.servletContext.getInitParameter(Log4jWebSupport.LOG4J_CONTEXT_NAME)).andReturn("helloWorld6");
         
expect(this.servletContext.getInitParameter(Log4jWebSupport.LOG4J_CONFIG_LOCATION)).andReturn(null);
@@ -421,7 +422,7 @@ public class Log4jWebInitializerImplTest {
 
     @Test
     public void testWrapExecutionWithNoParameters() throws Exception {
-        final Capture<Object> loggerContextCapture = new Capture<>();
+        final Capture<Object> loggerContextCapture = EasyMock.newCapture();
 
         
expect(this.servletContext.getInitParameter(Log4jWebSupport.LOG4J_CONTEXT_NAME)).andReturn(null);
         
expect(this.servletContext.getInitParameter(Log4jWebSupport.LOG4J_CONFIG_LOCATION)).andReturn(null);

Reply via email to