[Git][java-team/libcommons-lang3-java][master] Fixed the build failure with Easymock 4 (Closes: #912516)
Emmanuel Bourg
gitlab at salsa.debian.org
Sun Nov 25 23:50:54 GMT 2018
Emmanuel Bourg pushed to branch master at Debian Java Maintainers / libcommons-lang3-java
Commits:
a4ae5511 by Emmanuel Bourg at 2018-11-25T23:50:23Z
Fixed the build failure with Easymock 4 (Closes: #912516)
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/easymock-compatibility.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+libcommons-lang3-java (3.8-2) unstable; urgency=medium
+
+ * Team upload.
+ * Fixed the build failure with Easymock 4 (Closes: #912516)
+
+ -- Emmanuel Bourg <ebourg at apache.org> Mon, 26 Nov 2018 00:50:10 +0100
+
libcommons-lang3-java (3.8-1) unstable; urgency=medium
* Team upload.
=====================================
debian/patches/easymock-compatibility.patch
=====================================
@@ -0,0 +1,155 @@
+Description: Fixes the compatibility with Easymock 4
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: no
+--- a/src/test/java/org/apache/commons/lang3/event/EventListenerSupportTest.java
++++ b/src/test/java/org/apache/commons/lang3/event/EventListenerSupportTest.java
+@@ -52,7 +52,7 @@
+ //for fun, show that the same empty instance is used
+ assertSame(empty, listenerSupport.getListeners());
+
+- final VetoableChangeListener listener1 = EasyMock.createNiceMock(VetoableChangeListener.class);
++ final VetoableChangeListener listener1 = (VetoableChangeListener) EasyMock.createNiceMock(VetoableChangeListener.class);
+ listenerSupport.addListener(listener1);
+ assertEquals(1, listenerSupport.getListeners().length);
+ listenerSupport.addListener(listener1, false);
+@@ -120,10 +120,10 @@
+ //for fun, show that the same empty instance is used
+ assertSame(empty, listenerSupport.getListeners());
+
+- final VetoableChangeListener listener1 = EasyMock.createNiceMock(VetoableChangeListener.class);
++ final VetoableChangeListener listener1 = (VetoableChangeListener) EasyMock.createNiceMock(VetoableChangeListener.class);
+ listenerSupport.addListener(listener1);
+ assertEquals(1, listenerSupport.getListeners().length);
+- final VetoableChangeListener listener2 = EasyMock.createNiceMock(VetoableChangeListener.class);
++ final VetoableChangeListener listener2 = (VetoableChangeListener) EasyMock.createNiceMock(VetoableChangeListener.class);
+ listenerSupport.addListener(listener2);
+ assertEquals(2, listenerSupport.getListeners().length);
+ listenerSupport.removeListener(listener1);
+@@ -141,7 +141,7 @@
+ public void vetoableChange(final PropertyChangeEvent e) {
+ }
+ });
+- listenerSupport.addListener(EasyMock.createNiceMock(VetoableChangeListener.class));
++ listenerSupport.addListener((VetoableChangeListener) EasyMock.createNiceMock(VetoableChangeListener.class));
+
+ //serialize:
+ final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+@@ -199,7 +199,7 @@
+ }
+ };
+
+- final VetoableChangeListener listener = EasyMock.createNiceMock(VetoableChangeListener.class);
++ final VetoableChangeListener listener = (VetoableChangeListener) EasyMock.createNiceMock(VetoableChangeListener.class);
+ eventListenerSupport.addListener(listener);
+ final Object source = new Date();
+ final PropertyChangeEvent ignore = new PropertyChangeEvent(source, "Hour", 5, 6);
+--- a/src/test/java/org/apache/commons/lang3/concurrent/BasicThreadFactoryTest.java
++++ b/src/test/java/org/apache/commons/lang3/concurrent/BasicThreadFactoryTest.java
+@@ -97,7 +97,7 @@
+ */
+ @Test
+ public void testBuilderReset() {
+- final ThreadFactory wrappedFactory = EasyMock.createMock(ThreadFactory.class);
++ final ThreadFactory wrappedFactory = (ThreadFactory) EasyMock.createMock(ThreadFactory.class);
+ final Thread.UncaughtExceptionHandler exHandler = EasyMock
+ .createMock(Thread.UncaughtExceptionHandler.class);
+ EasyMock.replay(wrappedFactory, exHandler);
+@@ -117,7 +117,7 @@
+ */
+ @Test
+ public void testBuilderResetAfterBuild() {
+- builder.wrappedFactory(EasyMock.createNiceMock(ThreadFactory.class))
++ builder.wrappedFactory((ThreadFactory) EasyMock.createNiceMock(ThreadFactory.class))
+ .namingPattern(PATTERN).daemon(true).build();
+ checkFactoryDefaults(builder.build());
+ }
+@@ -127,8 +127,8 @@
+ */
+ @Test
+ public void testNewThreadNamingPattern() {
+- final ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
+- final Runnable r = EasyMock.createMock(Runnable.class);
++ final ThreadFactory wrapped = (ThreadFactory) EasyMock.createMock(ThreadFactory.class);
++ final Runnable r = (Runnable) EasyMock.createMock(Runnable.class);
+ final int count = 12;
+ for (int i = 0; i < count; i++) {
+ EasyMock.expect(wrapped.newThread(r)).andReturn(new Thread());
+@@ -151,8 +151,8 @@
+ */
+ @Test
+ public void testNewThreadNoNamingPattern() {
+- final ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
+- final Runnable r = EasyMock.createMock(Runnable.class);
++ final ThreadFactory wrapped = (ThreadFactory) EasyMock.createMock(ThreadFactory.class);
++ final Runnable r = (Runnable) EasyMock.createMock(Runnable.class);
+ final String name = "unchangedThreadName";
+ final Thread t = new Thread(name);
+ EasyMock.expect(wrapped.newThread(r)).andReturn(t);
+@@ -169,8 +169,8 @@
+ * @param flag the value of the flag
+ */
+ private void checkDaemonFlag(final boolean flag) {
+- final ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
+- final Runnable r = EasyMock.createMock(Runnable.class);
++ final ThreadFactory wrapped = (ThreadFactory) EasyMock.createMock(ThreadFactory.class);
++ final Runnable r = (Runnable) EasyMock.createMock(Runnable.class);
+ final Thread t = new Thread();
+ EasyMock.expect(wrapped.newThread(r)).andReturn(t);
+ EasyMock.replay(wrapped, r);
+@@ -203,9 +203,9 @@
+ */
+ @Test
+ public void testNewThreadNoDaemonFlag() {
+- final ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
+- final Runnable r1 = EasyMock.createMock(Runnable.class);
+- final Runnable r2 = EasyMock.createMock(Runnable.class);
++ final ThreadFactory wrapped = (ThreadFactory) EasyMock.createMock(ThreadFactory.class);
++ final Runnable r1 = (Runnable) EasyMock.createMock(Runnable.class);
++ final Runnable r2 = (Runnable) EasyMock.createMock(Runnable.class);
+ final Thread t1 = new Thread();
+ final Thread t2 = new Thread();
+ t1.setDaemon(true);
+@@ -225,8 +225,8 @@
+ */
+ @Test
+ public void testNewThreadPriority() {
+- final ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
+- final Runnable r = EasyMock.createMock(Runnable.class);
++ final ThreadFactory wrapped = (ThreadFactory) EasyMock.createMock(ThreadFactory.class);
++ final Runnable r = (Runnable) EasyMock.createMock(Runnable.class);
+ final Thread t = new Thread();
+ EasyMock.expect(wrapped.newThread(r)).andReturn(t);
+ EasyMock.replay(wrapped, r);
+@@ -244,8 +244,8 @@
+ */
+ @Test
+ public void testNewThreadNoPriority() {
+- final ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
+- final Runnable r = EasyMock.createMock(Runnable.class);
++ final ThreadFactory wrapped = (ThreadFactory) EasyMock.createMock(ThreadFactory.class);
++ final Runnable r = (Runnable) EasyMock.createMock(Runnable.class);
+ final int orgPriority = Thread.NORM_PRIORITY + 1;
+ final Thread t = new Thread();
+ t.setPriority(orgPriority);
+@@ -262,8 +262,8 @@
+ */
+ @Test
+ public void testNewThreadExHandler() {
+- final ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
+- final Runnable r = EasyMock.createMock(Runnable.class);
++ final ThreadFactory wrapped = (ThreadFactory) EasyMock.createMock(ThreadFactory.class);
++ final Runnable r = (Runnable) EasyMock.createMock(Runnable.class);
+ final Thread.UncaughtExceptionHandler handler = EasyMock
+ .createMock(Thread.UncaughtExceptionHandler.class);
+ final Thread t = new Thread();
+@@ -283,8 +283,8 @@
+ */
+ @Test
+ public void testNewThreadNoExHandler() {
+- final ThreadFactory wrapped = EasyMock.createMock(ThreadFactory.class);
+- final Runnable r = EasyMock.createMock(Runnable.class);
++ final ThreadFactory wrapped = (ThreadFactory) EasyMock.createMock(ThreadFactory.class);
++ final Runnable r = (Runnable) EasyMock.createMock(Runnable.class);
+ final Thread.UncaughtExceptionHandler handler = EasyMock
+ .createMock(Thread.UncaughtExceptionHandler.class);
+ final Thread t = new Thread();
=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
disable_testGetUserHome_test.diff
ignore-benchmarks.diff
+easymock-compatibility.patch
View it on GitLab: https://salsa.debian.org/java-team/libcommons-lang3-java/commit/a4ae5511deb7028b4d43da4e6520093005a49761
--
View it on GitLab: https://salsa.debian.org/java-team/libcommons-lang3-java/commit/a4ae5511deb7028b4d43da4e6520093005a49761
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20181125/666e951a/attachment.html>
More information about the pkg-java-commits
mailing list