You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ki...@apache.org on 2013/11/01 13:01:22 UTC
svn commit: r1537907 - in
/commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core:
algorithm/ composite/
Author: kinow
Date: Fri Nov 1 12:01:22 2013
New Revision: 1537907
URL: http://svn.apache.org/r1537907
Log:
FUNCTOR-29 removing Serializable from test classes
Modified:
commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestDoUntil.java
commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestDoWhile.java
commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestFoldLeft.java
commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestFoldRight.java
commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestRecursiveEvaluation.java
commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestUntilDo.java
commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestWhileDo.java
commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestAbstractLoopNullaryProcedure.java
commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestTransformedBinaryFunction.java
commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestTransformedBinaryProcedure.java
commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestTransformedNullaryFunction.java
commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestTransformedNullaryProcedure.java
Modified: commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestDoUntil.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestDoUntil.java?rev=1537907&r1=1537906&r2=1537907&view=diff
==============================================================================
--- commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestDoUntil.java (original)
+++ commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestDoUntil.java Fri Nov 1 12:01:22 2013
@@ -18,8 +18,6 @@ package org.apache.commons.functor.core.
import static org.junit.Assert.assertEquals;
-import java.io.Serializable;
-
import org.apache.commons.functor.BaseFunctorTest;
import org.apache.commons.functor.NullaryProcedure;
import org.apache.commons.functor.core.Offset;
@@ -51,8 +49,7 @@ public class TestDoUntil extends BaseFun
// Classes
// ------------------------------------------------------------------------
- static class Counter implements NullaryProcedure, Serializable {
- private static final long serialVersionUID = 1L;
+ static class Counter implements NullaryProcedure {
public void run() {
count++;
}
Modified: commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestDoWhile.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestDoWhile.java?rev=1537907&r1=1537906&r2=1537907&view=diff
==============================================================================
--- commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestDoWhile.java (original)
+++ commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestDoWhile.java Fri Nov 1 12:01:22 2013
@@ -18,8 +18,6 @@ package org.apache.commons.functor.core.
import static org.junit.Assert.assertEquals;
-import java.io.Serializable;
-
import org.apache.commons.functor.BaseFunctorTest;
import org.apache.commons.functor.NullaryProcedure;
import org.apache.commons.functor.core.Limit;
@@ -51,8 +49,7 @@ public class TestDoWhile extends BaseFun
// Classes
// ------------------------------------------------------------------------
- static class Counter implements NullaryProcedure, Serializable {
- private static final long serialVersionUID = 1L;
+ static class Counter implements NullaryProcedure {
public void run() {
count++;
}
Modified: commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestFoldLeft.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestFoldLeft.java?rev=1537907&r1=1537906&r2=1537907&view=diff
==============================================================================
--- commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestFoldLeft.java (original)
+++ commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestFoldLeft.java Fri Nov 1 12:01:22 2013
@@ -18,7 +18,6 @@ package org.apache.commons.functor.core.
import static org.junit.Assert.assertEquals;
-import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -58,8 +57,7 @@ public class TestFoldLeft extends BaseFu
// Classes
// ------------------------------------------------------------------------
- static class Sum implements BinaryFunction<Integer, Integer, Integer>, Serializable {
- private static final long serialVersionUID = 1L;
+ static class Sum implements BinaryFunction<Integer, Integer, Integer> {
public Integer evaluate(Integer a, Integer b) {
return new Integer(a + b);
Modified: commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestFoldRight.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestFoldRight.java?rev=1537907&r1=1537906&r2=1537907&view=diff
==============================================================================
--- commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestFoldRight.java (original)
+++ commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestFoldRight.java Fri Nov 1 12:01:22 2013
@@ -18,7 +18,6 @@ package org.apache.commons.functor.core.
import static org.junit.Assert.assertEquals;
-import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -58,8 +57,7 @@ public class TestFoldRight extends BaseF
// Classes
// ------------------------------------------------------------------------
- static class StringConcatenator implements BinaryFunction<Object, Object, Object>, Serializable {
- private static final long serialVersionUID = 1L;
+ static class StringConcatenator implements BinaryFunction<Object, Object, Object> {
public Object evaluate(Object left, Object right) {
StringBuilder buf = left instanceof StringBuilder ? (StringBuilder) left : new StringBuilder().append(left);
Modified: commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestRecursiveEvaluation.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestRecursiveEvaluation.java?rev=1537907&r1=1537906&r2=1537907&view=diff
==============================================================================
--- commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestRecursiveEvaluation.java (original)
+++ commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestRecursiveEvaluation.java Fri Nov 1 12:01:22 2013
@@ -19,8 +19,6 @@ package org.apache.commons.functor.core.
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
-import java.io.Serializable;
-
import org.apache.commons.functor.BaseFunctorTest;
import org.apache.commons.functor.NullaryFunction;
import org.junit.Test;
@@ -62,8 +60,7 @@ public class TestRecursiveEvaluation ext
// ------------------------------------------------------------------------
/** Recursive function for test. */
- static class RecFunc implements NullaryFunction<Object>, Serializable {
- private static final long serialVersionUID = 1L;
+ static class RecFunc implements NullaryFunction<Object> {
int times = 0;
boolean returnFunc = false;
@@ -103,8 +100,7 @@ public class TestRecursiveEvaluation ext
}
/** Inner function called from recursive function */
- static class InnerNullaryFunction implements NullaryFunction<Object>, Serializable {
- private static final long serialVersionUID = 1L;
+ static class InnerNullaryFunction implements NullaryFunction<Object> {
private int times;
Modified: commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestUntilDo.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestUntilDo.java?rev=1537907&r1=1537906&r2=1537907&view=diff
==============================================================================
--- commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestUntilDo.java (original)
+++ commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestUntilDo.java Fri Nov 1 12:01:22 2013
@@ -18,8 +18,6 @@ package org.apache.commons.functor.core.
import static org.junit.Assert.assertEquals;
-import java.io.Serializable;
-
import org.apache.commons.functor.BaseFunctorTest;
import org.apache.commons.functor.NullaryProcedure;
import org.apache.commons.functor.core.Offset;
@@ -51,8 +49,7 @@ public class TestUntilDo extends BaseFun
// Classes
// ------------------------------------------------------------------------
- static class Counter implements NullaryProcedure, Serializable {
- private static final long serialVersionUID = 1L;
+ static class Counter implements NullaryProcedure {
public void run() {
count++;
}
Modified: commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestWhileDo.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestWhileDo.java?rev=1537907&r1=1537906&r2=1537907&view=diff
==============================================================================
--- commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestWhileDo.java (original)
+++ commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/algorithm/TestWhileDo.java Fri Nov 1 12:01:22 2013
@@ -18,8 +18,6 @@ package org.apache.commons.functor.core.
import static org.junit.Assert.assertEquals;
-import java.io.Serializable;
-
import org.apache.commons.functor.BaseFunctorTest;
import org.apache.commons.functor.NullaryProcedure;
import org.apache.commons.functor.core.Limit;
@@ -52,8 +50,7 @@ public class TestWhileDo extends BaseFun
// Classes
// ------------------------------------------------------------------------
- static class Counter implements NullaryProcedure, Serializable {
- private static final long serialVersionUID = 1L;
+ static class Counter implements NullaryProcedure {
public void run() {
count++;
}
Modified: commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestAbstractLoopNullaryProcedure.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestAbstractLoopNullaryProcedure.java?rev=1537907&r1=1537906&r2=1537907&view=diff
==============================================================================
--- commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestAbstractLoopNullaryProcedure.java (original)
+++ commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestAbstractLoopNullaryProcedure.java Fri Nov 1 12:01:22 2013
@@ -52,7 +52,6 @@ public class TestAbstractLoopNullaryProc
}
class MockLoopProcedure extends AbstractLoopNullaryProcedure {
- private static final long serialVersionUID = 1L;
public MockLoopProcedure(NullaryPredicate condition, NullaryProcedure action) {
super(condition,action);
}
Modified: commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestTransformedBinaryFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestTransformedBinaryFunction.java?rev=1537907&r1=1537906&r2=1537907&view=diff
==============================================================================
--- commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestTransformedBinaryFunction.java (original)
+++ commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestTransformedBinaryFunction.java Fri Nov 1 12:01:22 2013
@@ -19,8 +19,6 @@ package org.apache.commons.functor.core.
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import java.io.Serializable;
-
import org.apache.commons.functor.BaseFunctorTest;
import org.apache.commons.functor.BinaryFunction;
import org.apache.commons.functor.Function;
@@ -33,8 +31,7 @@ import org.junit.Test;
*/
public class TestTransformedBinaryFunction extends BaseFunctorTest {
- private static class Sum implements BinaryFunction<Integer, Integer, Integer>, Serializable {
- private static final long serialVersionUID = 2255396324585938931L;
+ private static class Sum implements BinaryFunction<Integer, Integer, Integer> {
public Integer evaluate(Integer left, Integer right) {
return left+right;
}
@@ -48,8 +45,7 @@ public class TestTransformedBinaryFuncti
}
}
- private static class AddOne implements Function<Integer, Integer>, Serializable {
- private static final long serialVersionUID = 8759620198239402369L;
+ private static class AddOne implements Function<Integer, Integer> {
public Integer evaluate(Integer obj) {
return obj + 1;
}
Modified: commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestTransformedBinaryProcedure.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestTransformedBinaryProcedure.java?rev=1537907&r1=1537906&r2=1537907&view=diff
==============================================================================
--- commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestTransformedBinaryProcedure.java (original)
+++ commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestTransformedBinaryProcedure.java Fri Nov 1 12:01:22 2013
@@ -19,8 +19,6 @@ package org.apache.commons.functor.core.
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import java.io.Serializable;
-
import org.apache.commons.functor.BaseFunctorTest;
import org.apache.commons.functor.BinaryFunction;
import org.apache.commons.functor.Procedure;
@@ -33,8 +31,7 @@ import org.junit.Test;
*/
public class TestTransformedBinaryProcedure extends BaseFunctorTest {
- private static class Sum implements BinaryFunction<Integer, Integer, Integer>, Serializable {
- private static final long serialVersionUID = 2255396324585938931L;
+ private static class Sum implements BinaryFunction<Integer, Integer, Integer> {
public Integer evaluate(Integer left, Integer right) {
return left+right;
}
@@ -48,8 +45,7 @@ public class TestTransformedBinaryProced
}
}
- private static class Total implements Procedure<Integer>, Serializable {
- private static final long serialVersionUID = 8532164308852418241L;
+ private static class Total implements Procedure<Integer> {
private int total = 0;
public void run(Integer obj) {
total += obj;
Modified: commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestTransformedNullaryFunction.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestTransformedNullaryFunction.java?rev=1537907&r1=1537906&r2=1537907&view=diff
==============================================================================
--- commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestTransformedNullaryFunction.java (original)
+++ commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestTransformedNullaryFunction.java Fri Nov 1 12:01:22 2013
@@ -19,8 +19,6 @@ package org.apache.commons.functor.core.
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import java.io.Serializable;
-
import org.apache.commons.functor.BaseFunctorTest;
import org.apache.commons.functor.NullaryFunction;
import org.apache.commons.functor.Function;
@@ -32,8 +30,7 @@ import org.junit.Test;
*/
public class TestTransformedNullaryFunction extends BaseFunctorTest {
- private static class One implements NullaryFunction<Integer>, Serializable {
- private static final long serialVersionUID = 8160546546365936087L;
+ private static class One implements NullaryFunction<Integer> {
public Integer evaluate() {
return new Integer(1);
}
@@ -47,8 +44,7 @@ public class TestTransformedNullaryFunct
}
};
- private static class AddOne implements Function<Integer, Integer>, Serializable {
- private static final long serialVersionUID = 2005155787293129721L;
+ private static class AddOne implements Function<Integer, Integer> {
public Integer evaluate(Integer obj) {
return obj + 1;
}
Modified: commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestTransformedNullaryProcedure.java
URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestTransformedNullaryProcedure.java?rev=1537907&r1=1537906&r2=1537907&view=diff
==============================================================================
--- commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestTransformedNullaryProcedure.java (original)
+++ commons/proper/functor/trunk/core/src/test/java/org/apache/commons/functor/core/composite/TestTransformedNullaryProcedure.java Fri Nov 1 12:01:22 2013
@@ -19,8 +19,6 @@ package org.apache.commons.functor.core.
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-import java.io.Serializable;
-
import org.apache.commons.functor.BaseFunctorTest;
import org.apache.commons.functor.NullaryFunction;
import org.apache.commons.functor.Procedure;
@@ -32,8 +30,7 @@ import org.junit.Test;
*/
public class TestTransformedNullaryProcedure extends BaseFunctorTest{
- private static class One implements NullaryFunction<Integer>, Serializable {
- private static final long serialVersionUID = 7385852113529459456L;
+ private static class One implements NullaryFunction<Integer> {
public Integer evaluate() {
return new Integer(1);
}
@@ -47,8 +44,7 @@ public class TestTransformedNullaryProce
}
};
- private static class AggregatorProcedure implements Procedure<Integer>, Serializable {
- private static final long serialVersionUID = -2744193737701268327L;
+ private static class AggregatorProcedure implements Procedure<Integer> {
private int total = 0;
public void run(Integer obj) {
total += obj;