svn commit: r1363623 - /commons/proper/logging/trunk/pom.xml

2012-07-19 Thread sebb
Author: sebb
Date: Fri Jul 20 02:04:51 2012
New Revision: 1363623

URL: http://svn.apache.org/viewvc?rev=1363623&view=rev
Log:
Add missing property definitions for integration tests

Modified:
commons/proper/logging/trunk/pom.xml

Modified: commons/proper/logging/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/logging/trunk/pom.xml?rev=1363623&r1=1363622&r2=1363623&view=diff
==
--- commons/proper/logging/trunk/pom.xml (original)
+++ commons/proper/logging/trunk/pom.xml Fri Jul 20 02:04:51 2012
@@ -343,10 +343,16 @@ under the License.
   
 **/*TestCase.java
   
+  
+**/WeakHashTableTestCase.java
+  
   
 
+  ${log4j:log4j:jar}
+  ${logkit:logkit:jar}
+  ${javax.servlet:servlet-api:jar}
   
target/${project.build.finalName}.jar
   
target/${project.artifactId}-api-${project.version}.jar
   
target/${project.artifactId}-adapters-${project.version}.jar
@@ -371,6 +377,19 @@ under the License.
   gnu
 
   
+  
+  
+org.apache.maven.plugins
+maven-dependency-plugin
+2.4
+
+  
+
+  properties
+
+  
+
+  
 
 
   




svn commit: r1363622 - in /commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4j12: ApiClasspathStandardTestCase.java AppClasspathStandardTestCase.java ChildClasspathStandardTes

2012-07-19 Thread sebb
Author: sebb
Date: Fri Jul 20 02:04:03 2012
New Revision: 1363622

URL: http://svn.apache.org/viewvc?rev=1363622&view=rev
Log:
Allow test cases to run OK under Maven/Surefire
[does not seem to be needed for Ant testing]

Modified:

commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4j12/ApiClasspathStandardTestCase.java

commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4j12/AppClasspathStandardTestCase.java

commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4j12/ChildClasspathStandardTestCase.java

commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4j12/ParentClasspathStandardTestCase.java

Modified: 
commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4j12/ApiClasspathStandardTestCase.java
URL: 
http://svn.apache.org/viewvc/commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4j12/ApiClasspathStandardTestCase.java?rev=1363622&r1=1363621&r2=1363622&view=diff
==
--- 
commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4j12/ApiClasspathStandardTestCase.java
 (original)
+++ 
commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4j12/ApiClasspathStandardTestCase.java
 Fri Jul 20 02:04:03 2012
@@ -18,6 +18,7 @@
 package org.apache.commons.logging.log4j.log4j12;
 
 import junit.framework.Test;
+import junit.framework.TestCase;
 
 import org.apache.commons.logging.PathableClassLoader;
 import org.apache.commons.logging.PathableTestSuite;
@@ -29,7 +30,7 @@ import org.apache.commons.logging.Pathab
  * the parent classpath and commons-logging.jar is in the child.
  */
 
-public class ApiClasspathStandardTestCase {
+public class ApiClasspathStandardTestCase extends TestCase {
 
 /**
  * Return the tests included in this test suite.

Modified: 
commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4j12/AppClasspathStandardTestCase.java
URL: 
http://svn.apache.org/viewvc/commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4j12/AppClasspathStandardTestCase.java?rev=1363622&r1=1363621&r2=1363622&view=diff
==
--- 
commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4j12/AppClasspathStandardTestCase.java
 (original)
+++ 
commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4j12/AppClasspathStandardTestCase.java
 Fri Jul 20 02:04:03 2012
@@ -18,6 +18,7 @@
 package org.apache.commons.logging.log4j.log4j12;
 
 import junit.framework.Test;
+import junit.framework.TestCase;
 
 import org.apache.commons.logging.PathableClassLoader;
 import org.apache.commons.logging.PathableTestSuite;
@@ -27,7 +28,7 @@ import org.apache.commons.logging.Pathab
  * is in it, as would be the situation for a standalone application.
  */
 
-public class AppClasspathStandardTestCase {
+public class AppClasspathStandardTestCase extends TestCase {
 
 /**
  * Return the tests included in this test suite.

Modified: 
commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4j12/ChildClasspathStandardTestCase.java
URL: 
http://svn.apache.org/viewvc/commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4j12/ChildClasspathStandardTestCase.java?rev=1363622&r1=1363621&r2=1363622&view=diff
==
--- 
commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4j12/ChildClasspathStandardTestCase.java
 (original)
+++ 
commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4j12/ChildClasspathStandardTestCase.java
 Fri Jul 20 02:04:03 2012
@@ -18,6 +18,7 @@
 package org.apache.commons.logging.log4j.log4j12;
 
 import junit.framework.Test;
+import junit.framework.TestCase;
 
 import org.apache.commons.logging.PathableClassLoader;
 import org.apache.commons.logging.PathableTestSuite;
@@ -28,7 +29,7 @@ import org.apache.commons.logging.Pathab
  * a container where all the necessary libs are in the child.
  */
 
-public class ChildClasspathStandardTestCase {
+public class ChildClasspathStandardTestCase extends TestCase {
 
 /**
  * Return the tests included in this test suite.

Modified: 
commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4j12/ParentClasspathStandardTestCase.java
URL: 
http://svn.apache.org/viewvc/commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4j12/ParentClasspathStandardTestCase.java?rev=1363622&r1=1363621&r2=1363622&view=diff
==
--- 
commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4j12/ParentClasspathStandardTestCase.java
 (original)
+++ 
commons/proper/logging/trunk/src/test/org/apache/commons/logging/log4j/log4

svn commit: r1363618 - /commons/proper/logging/trunk/build.xml

2012-07-19 Thread sebb
Author: sebb
Date: Fri Jul 20 01:57:36 2012
New Revision: 1363618

URL: http://svn.apache.org/viewvc?rev=1363618&view=rev
Log:
Fix version

Modified:
commons/proper/logging/trunk/build.xml

Modified: commons/proper/logging/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/logging/trunk/build.xml?rev=1363618&r1=1363617&r2=1363618&view=diff
==
--- commons/proper/logging/trunk/build.xml (original)
+++ commons/proper/logging/trunk/build.xml Fri Jul 20 01:57:36 2012
@@ -94,7 +94,7 @@
   
 
   
-  
+  
 
   
   




svn commit: r1363612 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution: AbstractIntegerDistribution.java AbstractRealDistribution.java

2012-07-19 Thread erans
Author: erans
Date: Fri Jul 20 01:12:08 2012
New Revision: 1363612

URL: http://svn.apache.org/viewvc?rev=1363612&view=rev
Log:
MATH-764
MATH-823
Recovered backward-compatible functionality (removed in r1363604) for
deprecated field.

Modified:

commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/AbstractIntegerDistribution.java

commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/AbstractRealDistribution.java

Modified: 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/AbstractIntegerDistribution.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/AbstractIntegerDistribution.java?rev=1363612&r1=1363611&r2=1363612&view=diff
==
--- 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/AbstractIntegerDistribution.java
 (original)
+++ 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/AbstractIntegerDistribution.java
 Fri Jul 20 01:12:08 2012
@@ -171,6 +171,7 @@ implements IntegerDistribution, Serializ
 /** {@inheritDoc} */
 public void reseedRandomGenerator(long seed) {
 random.setSeed(seed);
+randomData.reSeed(seed);
 }
 
 /**

Modified: 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/AbstractRealDistribution.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/AbstractRealDistribution.java?rev=1363612&r1=1363611&r2=1363612&view=diff
==
--- 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/AbstractRealDistribution.java
 (original)
+++ 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/distribution/AbstractRealDistribution.java
 Fri Jul 20 01:12:08 2012
@@ -212,6 +212,7 @@ implements RealDistribution, Serializabl
 /** {@inheritDoc} */
 public void reseedRandomGenerator(long seed) {
 random.setSeed(seed);
+randomData.reSeed(seed);
 }
 
 /**




svn commit: r1363588 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/BinomialDistributionTest.java

2012-07-19 Thread erans
Author: erans
Date: Thu Jul 19 23:49:15 2012
New Revision: 1363588

URL: http://svn.apache.org/viewvc?rev=1363588&view=rev
Log:
Typo in svn tag.

Modified:

commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/BinomialDistributionTest.java

Modified: 
commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/BinomialDistributionTest.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/BinomialDistributionTest.java?rev=1363588&r1=1363587&r2=1363588&view=diff
==
--- 
commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/BinomialDistributionTest.java
 (original)
+++ 
commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/BinomialDistributionTest.java
 Thu Jul 19 23:49:15 2012
@@ -21,7 +21,6 @@ import org.junit.Test;
  * See class javadoc for IntegerDistributionAbstractTest for details.
  *
  * @version $Id$
- *  2009) $
  */
 public class BinomialDistributionTest extends IntegerDistributionAbstractTest {
 
@@ -140,6 +139,5 @@ public class BinomialDistributionTest ex
 int p = dist.inverseCumulativeProbability(0.5);
 Assert.assertEquals(trials / 2, p);
 }
-
 }
 }




svn commit: r1363575 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math3/TestUtils.java

2012-07-19 Thread erans
Author: erans
Date: Thu Jul 19 23:02:47 2012
New Revision: 1363575

URL: http://svn.apache.org/viewvc?rev=1363575&view=rev
Log:
MATH-829
Removed "throws" clause from method signature.

Modified:

commons/proper/math/trunk/src/test/java/org/apache/commons/math3/TestUtils.java

Modified: 
commons/proper/math/trunk/src/test/java/org/apache/commons/math3/TestUtils.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/TestUtils.java?rev=1363575&r1=1363574&r2=1363575&view=diff
==
--- 
commons/proper/math/trunk/src/test/java/org/apache/commons/math3/TestUtils.java 
(original)
+++ 
commons/proper/math/trunk/src/test/java/org/apache/commons/math3/TestUtils.java 
Thu Jul 19 23:02:47 2012
@@ -401,7 +401,7 @@ public class TestUtils {
  * @param observed observed counts
  * @param alpha significance level of the test
  */
-public static void assertChiSquareAccept(String[] valueLabels, double[] 
expected, long[] observed, double alpha) throws Exception {
+public static void assertChiSquareAccept(String[] valueLabels, double[] 
expected, long[] observed, double alpha) {
 ChiSquareTest chiSquareTest = new ChiSquareTest();
 
 // Fail if we can reject null hypothesis that distributions are the 
same
@@ -439,7 +439,7 @@ public class TestUtils {
  * @param observed observed counts
  * @param alpha significance level of the test
  */
-public static void assertChiSquareAccept(int[] values, double[] expected, 
long[] observed, double alpha) throws Exception {
+public static void assertChiSquareAccept(int[] values, double[] expected, 
long[] observed, double alpha) {
 String[] labels = new String[values.length];
 for (int i = 0; i < values.length; i++) {
 labels[i] = Integer.toString(values[i]);
@@ -455,7 +455,7 @@ public class TestUtils {
  * @param observed observed counts
  * @param alpha significance level of the test
  */
-public static void assertChiSquareAccept(double[] expected, long[] 
observed, double alpha) throws Exception {
+public static void assertChiSquareAccept(double[] expected, long[] 
observed, double alpha) {
 String[] labels = new String[expected.length];
 for (int i = 0; i < labels.length; i++) {
 labels[i] = Integer.toString(i + 1);
@@ -467,7 +467,7 @@ public class TestUtils {
  * Computes the 25th, 50th and 75th percentiles of the given distribution 
and returns
  * these values in an array.
  */
-public static double[] getDistributionQuartiles(RealDistribution 
distribution) throws Exception {
+public static double[] getDistributionQuartiles(RealDistribution 
distribution) {
 double[] quantiles = new double[3];
 quantiles[0] = distribution.inverseCumulativeProbability(0.25d);
 quantiles[1] = distribution.inverseCumulativeProbability(0.5d);




svn commit: r1363565 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/inference/MannWhitneyUTest.java

2012-07-19 Thread tn
Author: tn
Date: Thu Jul 19 22:02:16 2012
New Revision: 1363565

URL: http://svn.apache.org/viewvc?rev=1363565&view=rev
Log:
Fixed checkstyle warning.

Modified:

commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/inference/MannWhitneyUTest.java

Modified: 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/inference/MannWhitneyUTest.java
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/inference/MannWhitneyUTest.java?rev=1363565&r1=1363564&r2=1363565&view=diff
==
--- 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/inference/MannWhitneyUTest.java
 (original)
+++ 
commons/proper/math/trunk/src/main/java/org/apache/commons/math3/stat/inference/MannWhitneyUTest.java
 Thu Jul 19 22:02:16 2012
@@ -170,7 +170,7 @@ public class MannWhitneyUTest {
  final int n2)
 throws ConvergenceException, MaxCountExceededException {
 
-/* long multiplication to avoid overflow (double not used due to 
efficiency 
+/* long multiplication to avoid overflow (double not used due to 
efficiency
  * and to avoid precision loss)
  */
 final long n1n2prod = (long) n1 * n2;




svn commit: r1363514 [2/2] - in /commons/proper/functor/trunk/src: changes/ test/java/org/apache/commons/functor/ test/java/org/apache/commons/functor/core/collection/ test/java/org/apache/commons/fun

2012-07-19 Thread kinow
Modified: 
commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/map/FunctoredMap.java
URL: 
http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/map/FunctoredMap.java?rev=1363514&r1=1363513&r2=1363514&view=diff
==
--- 
commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/map/FunctoredMap.java
 (original)
+++ 
commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/example/map/FunctoredMap.java
 Thu Jul 19 20:13:49 2012
@@ -31,9 +31,9 @@ import org.apache.commons.functor.UnaryP
  * @version $Revision$ $Date$
  */
 @SuppressWarnings("unchecked")
-public class FunctoredMap implements Map {
-public FunctoredMap(Map map) {
-this.map = map;
+public class FunctoredMap implements Map {
+public FunctoredMap(Map map) {
+this.map = (Map)map;
 }
 
 @Override
@@ -46,16 +46,16 @@ public class FunctoredMap implements Map
 return map.toString();
 }
 
-public Collection values() {
+public Collection values() {
 return map.values();
 }
 
-public Set keySet() {
+public Set keySet() {
 return map.keySet();
 }
 
-public Object get(Object key) {
-return onget.evaluate(map,key);
+public V get(Object key) {
+return onget.evaluate(map, (K)key);
 }
 
 public void clear() {
@@ -70,11 +70,11 @@ public class FunctoredMap implements Map
 return onput.evaluate(map, new Object[] { key, value });
 }
 
-public void putAll(Map src) {
-onputall.run(map, src);
+public void putAll(Map src) {
+onputall.run(map, (Map)src);
 }
 
-public Set entrySet() {
+public Set> entrySet() {
 return map.entrySet();
 }
 
@@ -86,8 +86,8 @@ public class FunctoredMap implements Map
 return map.isEmpty();
 }
 
-public Object remove(Object key) {
-return onremove.evaluate(map,key);
+public V remove(Object key) {
+return onremove.evaluate(map, (K)key);
 }
 
 @Override
@@ -101,80 +101,80 @@ public class FunctoredMap implements Map
 
 // protected
 
-protected void setOnClear(UnaryProcedure procedure) {
+protected void setOnClear(UnaryProcedure> procedure) {
 onclear = procedure;
 }
 
-protected void setOnPut(BinaryFunction function) {
+protected void setOnPut(BinaryFunction, Object[], V> function) {
 onput = function;
 }
 
-protected void setOnGet(BinaryFunction function) {
+protected void setOnGet(BinaryFunction, K, V> function) {
 onget = function;
 }
 
-protected void setOnPutAll(BinaryProcedure procedure) {
+protected void setOnPutAll(BinaryProcedure, Map> 
procedure) {
 onputall = procedure;
 }
 
-protected void setOnRemove(BinaryFunction function) {
+protected void setOnRemove(BinaryFunction, K, V> function) {
 onremove = function;
 }
 
 // attributes
 
-protected static final BinaryFunction DEFAULT_ON_PUT = new 
BinaryFunction() {
-public Object evaluate(Object a, Object b) {
-Map map = (Map) a;
-Object key = Array.get(b,0);
-Object value = Array.get(b,1);
+protected BinaryFunction, Object[], V> DEFAULT_ON_PUT = new 
BinaryFunction, Object[], V>() {
+public V evaluate(Map a, Object[] b) {
+Map map = a;
+K key = (K)Array.get(b,0);
+V value = (V)Array.get(b,1);
 return map.put(key,value);
 }
 };
 
-private BinaryFunction onput = DEFAULT_ON_PUT;
+private BinaryFunction, Object[], V> onput = DEFAULT_ON_PUT;
 
-protected static final BinaryFunction DEFAULT_ON_GET = new 
BinaryFunction() {
-public Object evaluate(Object map, Object key) {
-return ((Map) map).get(key);
+protected BinaryFunction, K, V> DEFAULT_ON_GET = new 
BinaryFunction, K, V>() {
+public V evaluate(Map map, K key) {
+return map.get(key);
 }
 };
 
-private BinaryFunction onget = DEFAULT_ON_GET;
-
-protected static final BinaryProcedure DEFAULT_ON_PUT_ALL = new 
BinaryProcedure() {
-public void run(Object a, Object b) {
-Map dest = (Map) a;
-Map src = (Map) b;
+private BinaryFunction, K, V> onget = DEFAULT_ON_GET;
+
+protected BinaryProcedure, Map> DEFAULT_ON_PUT_ALL = new 
BinaryProcedure, Map>() {
+public void run(Map a, Map b) {
+Map dest = a;
+Map src = b;
 dest.putAll(src);
 }
 };
 
-private BinaryProcedure onputall = DEFAULT_ON_PUT_ALL;
+private BinaryProcedure, Map> onputall = 
DEFAULT_ON_PUT_ALL;
 
-protected static final BinaryFunction DEFAULT_ON_REMOVE = new 
BinaryFunction() {
-public Object evaluate(Object a, Object key) {
-Map map = (Map) a;
+protect

svn commit: r1363443 - /commons/proper/functor/trunk/src/changes/changes.xml

2012-07-19 Thread kinow
Author: kinow
Date: Thu Jul 19 17:57:46 2012
New Revision: 1363443

URL: http://svn.apache.org/viewvc?rev=1363443&view=rev
Log:
[FUNCTOR-21] Updated changes.xml including the changes in this issue

Modified:
commons/proper/functor/trunk/src/changes/changes.xml

Modified: commons/proper/functor/trunk/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/changes/changes.xml?rev=1363443&r1=1363442&r2=1363443&view=diff
==
--- commons/proper/functor/trunk/src/changes/changes.xml (original)
+++ commons/proper/functor/trunk/src/changes/changes.xml Thu Jul 19 17:57:46 
2012
@@ -23,6 +23,9 @@
   
   
 
+  
+Fix NPE in UnarySequence.
+  
   
 Fix checkstyle warnings
   




svn propchange: r1363382 - svn:log

2012-07-19 Thread kinow
Author: kinow
Revision: 1363382
Modified property: svn:log

Modified: svn:log at Thu Jul 19 17:43:50 2012
--
--- svn:log (original)
+++ svn:log Thu Jul 19 17:43:50 2012
@@ -1 +1 @@
-FIXED FUNCTOR-21: Added an extra verification in the then() method of 
UnarySequence to avoid the NPE. Tests in place.
+[FUNCTOR-21] Added an extra verification in the then() method of UnarySequence 
to avoid the NPE. Tests in place.



svn commit: r1363382 - in /commons/proper/functor/trunk/src: main/java/org/apache/commons/functor/core/composite/UnarySequence.java test/java/org/apache/commons/functor/core/composite/TestUnarySequenc

2012-07-19 Thread kinow
Author: kinow
Date: Thu Jul 19 15:23:19 2012
New Revision: 1363382

URL: http://svn.apache.org/viewvc?rev=1363382&view=rev
Log:
FIXED FUNCTOR-21: Added an extra verification in the then() method of 
UnarySequence to avoid the NPE. Tests in place.

Modified:

commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/UnarySequence.java

commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnarySequence.java

Modified: 
commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/UnarySequence.java
URL: 
http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/UnarySequence.java?rev=1363382&r1=1363381&r2=1363382&view=diff
==
--- 
commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/UnarySequence.java
 (original)
+++ 
commons/proper/functor/trunk/src/main/java/org/apache/commons/functor/core/composite/UnarySequence.java
 Thu Jul 19 15:23:19 2012
@@ -98,7 +98,9 @@ public class UnarySequence implements
  * @return this
  */
 public UnarySequence then(UnaryProcedure p) {
-list.add(p);
+if (p != null) {
+list.add(p);
+}
 return this;
 }
 

Modified: 
commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnarySequence.java
URL: 
http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnarySequence.java?rev=1363382&r1=1363381&r2=1363382&view=diff
==
--- 
commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnarySequence.java
 (original)
+++ 
commons/proper/functor/trunk/src/test/java/org/apache/commons/functor/core/composite/TestUnarySequence.java
 Thu Jul 19 15:23:19 2012
@@ -17,6 +17,7 @@
 package org.apache.commons.functor.core.composite;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -44,6 +45,26 @@ public class TestUnarySequence extends B
 // 
 
 @Test
+public void testConstructors() throws Exception {
+UnarySequence seq1 = new 
UnarySequence((UnaryProcedure)null);
+UnarySequence seq2 = new UnarySequence();
+assertObjectsAreEqual(seq1, seq2);
+
+RunCounter p1 = new RunCounter();
+RunCounter p2 = new RunCounter();
+List> iterable = new 
ArrayList>();
+iterable.add(p1);
+iterable.add(p2);
+UnarySequence seq3 = new UnarySequence(iterable);
+UnarySequence seq4 = new UnarySequence(p1, p2);
+assertObjectsAreEqual(seq3, seq4);
+
+UnarySequence seq5 = new 
UnarySequence((Iterable>)null);
+UnarySequence seq6 = new 
UnarySequence((UnaryProcedure[])null);
+assertObjectsAreEqual(seq5, seq6);
+}
+
+@Test
 public void testRunZero() throws Exception {
 UnarySequence seq = new UnarySequence();
 seq.run(null);
@@ -110,6 +131,7 @@ public class TestUnarySequence extends B
 }
 
 assertObjectsAreNotEqual(p,new NoOp());
+assertFalse(p.equals(null));
 }
 
 // Classes




svn commit: r1363309 - in /commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution: AbstractIntegerDistributionTest.java AbtractIntegerDistributionTest.java

2012-07-19 Thread erans
Author: erans
Date: Thu Jul 19 12:01:05 2012
New Revision: 1363309

URL: http://svn.apache.org/viewvc?rev=1363309&view=rev
Log:
Fixed typo in class name.

Added:

commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/AbstractIntegerDistributionTest.java
  - copied, changed from r1363159, 
commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/AbtractIntegerDistributionTest.java
Removed:

commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/AbtractIntegerDistributionTest.java

Copied: 
commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/AbstractIntegerDistributionTest.java
 (from r1363159, 
commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/AbtractIntegerDistributionTest.java)
URL: 
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/AbstractIntegerDistributionTest.java?p2=commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/AbstractIntegerDistributionTest.java&p1=commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/AbtractIntegerDistributionTest.java&r1=1363159&r2=1363309&rev=1363309&view=diff
==
--- 
commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/AbtractIntegerDistributionTest.java
 (original)
+++ 
commons/proper/math/trunk/src/test/java/org/apache/commons/math3/distribution/AbstractIntegerDistributionTest.java
 Thu Jul 19 12:01:05 2012
@@ -24,7 +24,7 @@ import org.junit.Test;
  *
  * @version $Id$
  */
-public class AbtractIntegerDistributionTest {
+public class AbstractIntegerDistributionTest {
 protected final DiceDistribution diceDistribution = new DiceDistribution();
 protected final double p = diceDistribution.probability(1);
 




svn commit: r1363305 [3/3] - in /commons/proper/chain/trunk: apps/cookbook-examples/src/main/java/org/apache/commons/chain2/cookbook/agility/ apps/cookbook-examples/src/main/java/org/apache/commons/ch

2012-07-19 Thread simonetripodi
Modified: 
commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/servlet/ServletWebContext.java
URL: 
http://svn.apache.org/viewvc/commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/servlet/ServletWebContext.java?rev=1363305&r1=1363304&r2=1363305&view=diff
==
--- 
commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/servlet/ServletWebContext.java
 (original)
+++ 
commons/proper/chain/trunk/web/src/main/java/org/apache/commons/chain2/web/servlet/ServletWebContext.java
 Thu Jul 19 11:42:53 2012
@@ -16,7 +16,6 @@
  */
 package org.apache.commons.chain2.web.servlet;
 
-
 import org.apache.commons.chain2.web.WebContext;
 
 import javax.servlet.ServletContext;
@@ -25,7 +24,6 @@ import javax.servlet.http.HttpServletReq
 import javax.servlet.http.HttpServletResponse;
 import java.util.Map;
 
-
 /**
  * Concrete implementation of {@link WebContext} suitable for use in
  * Servlets and JSP pages.  The abstract methods are mapped to the appropriate
@@ -34,22 +32,18 @@ import java.util.Map;
  *
  * @version $Id$
  */
-
 public class ServletWebContext extends WebContext {
 
 private static final long serialVersionUID = 5852676730841544890L;
 
-
 //  
Constructors
 
-
 /**
  * Construct an uninitialized {@link ServletWebContext} instance.
  */
 public ServletWebContext() {
 }
 
-
 /**
  * Construct a {@link ServletWebContext} instance that is initialized
  * with the specified Servlet API objects.
@@ -61,134 +55,108 @@ public class ServletWebContext extends W
 public ServletWebContext(ServletContext context,
  HttpServletRequest request,
  HttpServletResponse response) {
-
 initialize(context, request, response);
-
 }
 
-
 // -- Instance 
Variables
 
-
 /**
  * The lazily instantiated Map of application scope
  * attributes.
  */
 private Map applicationScope = null;
 
-
 /**
  * The ServletContext for this web application.
  */
 private ServletContext context = null;
 
-
 /**
  * The lazily instantiated Map of header name-value
  * combinations (immutable).
  */
 private Map header = null;
 
-
 /**
  * The lazily instantitated Map of header name-values
  * combinations (immutable).
  */
 private Map headerValues = null;
 
-
 /**
  * The lazily instantiated Map of context initialization
  * parameters.
  */
 private Map initParam = null;
 
-
 /**
  * The lazily instantiated Map of cookies.
  */
 private Map cookieValues = null;
 
-
 /**
  * The lazily instantiated Map of request
  * parameter name-value.
  */
 private Map param = null;
 
-
 /**
  * The lazily instantiated Map of request
  * parameter name-values.
  */
 private Map paramValues = null;
 
-
 /**
  * The HttpServletRequest for this request.
  */
 private HttpServletRequest request = null;
 
-
 /**
  * The lazily instantiated Map of request scope
  * attributes.
  */
 private Map requestScope = null;
 
-
 /**
  * The HttpServletResponse for this request.
  */
 private HttpServletResponse response = null;
 
-
 /**
  * The lazily instantiated Map of session scope
  * attributes.
  */
 private Map sessionScope = null;
 
-
 // -- Public 
Methods
 
-
 /**
  * Return the {@link ServletContext} for this context.
  *
  * @return The ServletContext for this context.
  */
 public ServletContext getContext() {
-
-return (this.context);
-
+return (this.context);
 }
 
-
 /**
  * Return the {@link HttpServletRequest} for this context.
  *
  * @return The HttpServletRequest for this context.
  */
 public HttpServletRequest getRequest() {
-
-return (this.request);
-
+return (this.request);
 }
 
-
 /**
  * Return the {@link HttpServletResponse} for this context.
  *
  * @return The HttpServletResponse for this context.
  */
 public HttpServletResponse getResponse() {
-
-return (this.response);
-
+return (this.response);
 }
 
-
 /**
  * Initialize (or reinitialize) this {@link ServletWebContext} instance
  * for the specified Servlet API objects.
@@ -200,17 +168,14 @@ public class ServletWebContext extends W
 public void initialize(ServletContext context,
HttpServletRequest request,
HttpServletResponse response) {
-
 // Save the specified Servlet API object references
 this.context = context;
 this.request = request;

svn commit: r1363267 - /commons/proper/chain/trunk/RELEASE-NOTES.txt

2012-07-19 Thread simonetripodi
Author: simonetripodi
Date: Thu Jul 19 09:03:23 2012
New Revision: 1363267

URL: http://svn.apache.org/viewvc?rev=1363267&view=rev
Log:
updated release notes according to resolved issues on JIRA

Modified:
commons/proper/chain/trunk/RELEASE-NOTES.txt

Modified: commons/proper/chain/trunk/RELEASE-NOTES.txt
URL: 
http://svn.apache.org/viewvc/commons/proper/chain/trunk/RELEASE-NOTES.txt?rev=1363267&r1=1363266&r2=1363267&view=diff
==
--- commons/proper/chain/trunk/RELEASE-NOTES.txt (original)
+++ commons/proper/chain/trunk/RELEASE-NOTES.txt Thu Jul 19 09:03:23 2012
@@ -55,29 +55,36 @@ The Recommended Dependency Set for Chain
 The Recommended Dependency Set for Chain Web 2.0 is:
Chain 2.0 + Chain Configuration 2.0 + Container Provided dependencies
 
-NEW FEATURES
-=
+BUG
+
 
- * [CHAIN-70] Add a small EDSL to simplify Chain setup and execution
- * [CHAIN-58] Update Chain Context interface to use K,V generics
- * [CHAIN-56] clever Context with generic type "auto-cast" feature.
- * [CHAIN-55] split the huge project in submodules.
+ * [CHAIN-57] - Chain 2.0 does not build on older JDKs
+ * [CHAIN-60] - In certain build configurations unit tests fail with the 
following message: testDefault: Correct command count expected:<17> but was:<19>
+ * [CHAIN-61] - Chain 2.0 trunk build is throwing many warnings as a result of 
generification changes
+ * [CHAIN-64] - Context should be Map
+ * [CHAIN-68] - SNAPSHOT tomcat plugin breaks the build
 
-BUGS FIXED SINCE PREVIOUS RELEASE
-===
+IMPROVEMENT
+
 
- * [CHAIN-61] Chain 2.0 trunk build is throwing many warnings as a result of 
generification changes.
+ * [CHAIN-54] - upgrate JUnit dependency to latest released version and adapt 
tests
+ * [CHAIN-55] - split the huge project in submodules
+ * [CHAIN-56] - clever Context with generic type "auto-cast" feature
+ * [CHAIN-58] - Update Chain Context interface to use K,V generics
+ * [CHAIN-63] - Replace Context with Map
+ * [CHAIN-66] - Updated Chain documentation to include new changes to the API
+ * [CHAIN-67] - Refactor of explicit Exception throws to a RuntimeException 
type
+ * [CHAIN-69] - Fixed Checkstyle / PMD Warnings
 
-IMPROVEMENTS OVER PREVIOUS RELEASE
-===
+NEW FEATURE
+
 
- * [CHAIN-65] Rename package org.apache.commons.chain to 
org.apache.commons.chain2 for v2 of chain.
- * [CHAIN-53] Global Update of Chain - Generics, JDK 1.5, Update Dependency 
Versions.
+ * [CHAIN-70] - Add a small EDSL to simplify Chain setup and execution.
 
-DEPRECATIONS
+TASK
 
 
- * NONE
+ * [CHAIN-65] - Rename package org.apache.commons.chain to 
org.apache.commons.chain2 for v2 of chain
 
 OTHER NOTES
 




svn commit: r1363266 - /commons/proper/chain/trunk/src/changes/changes.xml

2012-07-19 Thread simonetripodi
Author: simonetripodi
Date: Thu Jul 19 08:58:18 2012
New Revision: 1363266

URL: http://svn.apache.org/viewvc?rev=1363266&view=rev
Log:
CHAIN-68/69 are bugs, not improvements

Modified:
commons/proper/chain/trunk/src/changes/changes.xml

Modified: commons/proper/chain/trunk/src/changes/changes.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/chain/trunk/src/changes/changes.xml?rev=1363266&r1=1363265&r2=1363266&view=diff
==
--- commons/proper/chain/trunk/src/changes/changes.xml (original)
+++ commons/proper/chain/trunk/src/changes/changes.xml Thu Jul 19 08:58:18 2012
@@ -44,10 +44,10 @@ The  type attribute can be add,u
   
 Add a small EDSL to simplify Chain setup and execution.
   
-  
+  
 Fixed Checkstyle / PMD Warnings
   
-  
+  
 SNAPSHOT tomcat plugin breaks the build
   
   




svn commit: r1363265 - in /commons/proper/chain/trunk: ./ core/src/main/java/org/apache/commons/chain2/ core/src/test/java/org/apache/commons/chain2/impl/ src/changes/

2012-07-19 Thread simonetripodi
Author: simonetripodi
Date: Thu Jul 19 08:56:32 2012
New Revision: 1363265

URL: http://svn.apache.org/viewvc?rev=1363265&view=rev
Log:
[CHAIN-70] Add a small EDSL to simplify Chain setup and execution

Added:

commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/ChainExecutor.java
   (with props)

commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/Chains.java
   (with props)

commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/CommandSetter.java
   (with props)

commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/ToExecutorCommandSetter.java
   (with props)

commons/proper/chain/trunk/core/src/test/java/org/apache/commons/chain2/impl/FluentInterfacesTestCase.java
   (with props)
Modified:
commons/proper/chain/trunk/RELEASE-NOTES.txt
commons/proper/chain/trunk/src/changes/changes.xml

Modified: commons/proper/chain/trunk/RELEASE-NOTES.txt
URL: 
http://svn.apache.org/viewvc/commons/proper/chain/trunk/RELEASE-NOTES.txt?rev=1363265&r1=1363264&r2=1363265&view=diff
==
--- commons/proper/chain/trunk/RELEASE-NOTES.txt (original)
+++ commons/proper/chain/trunk/RELEASE-NOTES.txt Thu Jul 19 08:56:32 2012
@@ -58,6 +58,7 @@ The Recommended Dependency Set for Chain
 NEW FEATURES
 =
 
+ * [CHAIN-70] Add a small EDSL to simplify Chain setup and execution
  * [CHAIN-58] Update Chain Context interface to use K,V generics
  * [CHAIN-56] clever Context with generic type "auto-cast" feature.
  * [CHAIN-55] split the huge project in submodules.

Added: 
commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/ChainExecutor.java
URL: 
http://svn.apache.org/viewvc/commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/ChainExecutor.java?rev=1363265&view=auto
==
--- 
commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/ChainExecutor.java
 (added)
+++ 
commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/ChainExecutor.java
 Thu Jul 19 08:56:32 2012
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.chain2;
+
+import java.util.Map;
+
+/**
+ * Builder that allows continue adding a command in the target chain and 
execute it.
+ *
+ * @param  Context key type
+ * @param  Context value type
+ * @param  Type of the context associated with this chain executor
+ * @since 2.0
+ */
+public interface ChainExecutor> extends 
CommandSetter> {
+
+/**
+ * Execute the processing represented by the target chain.
+ *
+ * @param context the context processed by the target chain
+ * @return true, if the processing of the target chain has been completed,
+ * false otherwise
+ * @see Chain#execute(Map)
+ */
+boolean execute(C context);
+
+}

Propchange: 
commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/ChainExecutor.java
--
svn:eol-style = native

Propchange: 
commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/ChainExecutor.java
--
svn:keywords = Date Author Id Revision HeadURL

Propchange: 
commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/ChainExecutor.java
--
svn:mime-type = text/plain

Added: 
commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/Chains.java
URL: 
http://svn.apache.org/viewvc/commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/Chains.java?rev=1363265&view=auto
==
--- 
commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/Chains.java
 (added)
+++ 
commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/Chains.java
 Thu Jul 19 08:56:32 2012
@@ -0,0 +1,90 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) 

svn commit: r1363256 - /commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/Chain.java

2012-07-19 Thread simonetripodi
Author: simonetripodi
Date: Thu Jul 19 08:12:16 2012
New Revision: 1363256

URL: http://svn.apache.org/viewvc?rev=1363256&view=rev
Log:
javadoc typo

Modified:

commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/Chain.java

Modified: 
commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/Chain.java
URL: 
http://svn.apache.org/viewvc/commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/Chain.java?rev=1363256&r1=1363255&r2=1363256&view=diff
==
--- 
commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/Chain.java
 (original)
+++ 
commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/Chain.java
 Thu Jul 19 08:12:16 2012
@@ -50,7 +50,7 @@ import java.util.Map;
  *
  * @param  Context key type
  * @param  Context value type
- * @param  Type of the context associated with this command
+ * @param  Type of the context associated with this chain
  *
  * @author Craig R. McClanahan
  * @version $Revision$ $Date$