Nexus: Staging Completed.
Description:Artefacts for Commons Math 3.1 (RC5).Details:The following artifacts have been staged to the org.apache.commons-052 (u:erans, a:164.15.125.60) repository.archetype-catalog.xmlcommons-math3-3.1-sources.jarcommons-math3-3.1-javadoc.jar.asccommons-math3-3.1-bin.zip.asccommons-math3-3.1-tests.jarcommons-math3-3.1-src.tar.gzcommons-math3-3.1-src.zipcommons-math3-3.1-src.tar.gz.asccommons-math3-3.1-bin.zipcommons-math3-3.1-bin.tar.gz.asccommons-math3-3.1-test-sources.jar.asccommons-math3-3.1-src.zip.asccommons-math3-3.1.pomcommons-math3-3.1.jar.asccommons-math3-3.1-sources.jar.asccommons-math3-3.1-bin.tar.gzcommons-math3-3.1.jarcommons-math3-3.1-javadoc.jarcommons-math3-3.1-test-sources.jarcommons-math3-3.1.pom.asccommons-math3-3.1-tests.jar.asc
svn commit: r1424260 - /commons/proper/math/trunk/doc/release/release.howto.txt
Author: erans Date: Thu Dec 20 01:25:53 2012 New Revision: 1424260 URL: http://svn.apache.org/viewvc?rev=1424260&view=rev Log: Document update. Modified: commons/proper/math/trunk/doc/release/release.howto.txt Modified: commons/proper/math/trunk/doc/release/release.howto.txt URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/doc/release/release.howto.txt?rev=1424260&r1=1424259&r2=1424260&view=diff == --- commons/proper/math/trunk/doc/release/release.howto.txt (original) +++ commons/proper/math/trunk/doc/release/release.howto.txt Thu Dec 20 01:25:53 2012 @@ -5,6 +5,15 @@ The files "settings-security.xml" and "s of files used by maven to pick up authentication credentials needed to connect to remote servers and to cryptographically sign the artefacts. +(0) +Preliminary checks: + * All Java files must contain a license header. The "RAT" maven plugin will + generate a report indicating for which files the license is missing. + * For a "minor" release, the library must be backward-compatible. Check all + the errors reported by the "Clirr" plugin. + * Clear all "CheckStyle" warnings. + * Make sure that the construct reported by "FindBugs" are intentional. + (1) As a first optional step, you can test that everything works locally, i.e.
Nexus: Staging Repository Dropped.
Description:Missing headers in unit test Java files.Details:The org.apache.commons-048 (u:erans, a:164.15.125.60) staging repository has been dropped.
svn commit: r1424254 - in /commons/proper/math/tags/MATH_3_1_RC5: ./ pom.xml
Author: erans Date: Thu Dec 20 01:08:36 2012 New Revision: 1424254 URL: http://svn.apache.org/viewvc?rev=1424254&view=rev Log: Creating Commons Math v3.1 RC5 tag. Added: commons/proper/math/tags/MATH_3_1_RC5/ - copied from r1424253, commons/proper/math/trunk/ Modified: commons/proper/math/tags/MATH_3_1_RC5/pom.xml Modified: commons/proper/math/tags/MATH_3_1_RC5/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/math/tags/MATH_3_1_RC5/pom.xml?rev=1424254&r1=1424253&r2=1424254&view=diff == --- commons/proper/math/tags/MATH_3_1_RC5/pom.xml (original) +++ commons/proper/math/tags/MATH_3_1_RC5/pom.xml Thu Dec 20 01:08:36 2012 @@ -24,7 +24,7 @@ 4.0.0 org.apache.commons commons-math3 - 3.1-SNAPSHOT + 3.1 Commons Math 2003 @@ -293,9 +293,9 @@ math3 -3.0 -(requires Java 1.5+; not compatible with 2.2) - +3.1 +(requires Java 1.5+) +RC5 -bin 2.2
svn commit: r1424252 - /commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/differentiation/DSCompilerTest.java
Author: erans Date: Thu Dec 20 00:49:00 2012 New Revision: 1424252 URL: http://svn.apache.org/viewvc?rev=1424252&view=rev Log: Typo in method names. Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/differentiation/DSCompilerTest.java Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/differentiation/DSCompilerTest.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/differentiation/DSCompilerTest.java?rev=1424252&r1=1424251&r2=1424252&view=diff == --- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/differentiation/DSCompilerTest.java (original) +++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/differentiation/DSCompilerTest.java Thu Dec 20 00:49:00 2012 @@ -130,12 +130,12 @@ public class DSCompilerTest { } @Test(expected=DimensionMismatchException.class) -public void testIncompatbileParams() { +public void testIncompatibleParams() { DSCompiler.getCompiler(3, 2).checkCompatibility(DSCompiler.getCompiler(4, 2)); } @Test(expected=DimensionMismatchException.class) -public void testIncompatbileOrder() { +public void testIncompatibleOrder() { DSCompiler.getCompiler(3, 3).checkCompatibility(DSCompiler.getCompiler(3, 2)); }
svn commit: r1424226 - /commons/proper/functor/trunk/src/site/xdoc/examples.xml
Author: kinow Date: Wed Dec 19 23:39:27 2012 New Revision: 1424226 URL: http://svn.apache.org/viewvc?rev=1424226&view=rev Log: Adding link to Aggregators javadoc in the examples page Modified: commons/proper/functor/trunk/src/site/xdoc/examples.xml Modified: commons/proper/functor/trunk/src/site/xdoc/examples.xml URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/site/xdoc/examples.xml?rev=1424226&r1=1424225&r2=1424226&view=diff == --- commons/proper/functor/trunk/src/site/xdoc/examples.xml (original) +++ commons/proper/functor/trunk/src/site/xdoc/examples.xml Wed Dec 19 23:39:27 2012 @@ -28,8 +28,9 @@ This page contains basic examples using Predicates, Functions, - Procedures and - Generators. + Procedures, + Generators and + Aggregators. There are also examples using composition and more practical examples at the bottom of this page.
svn commit: r1424224 - /commons/proper/functor/trunk/src/site/xdoc/aggregator.xml
Author: kinow Date: Wed Dec 19 23:38:32 2012 New Revision: 1424224 URL: http://svn.apache.org/viewvc?rev=1424224&view=rev Log: FUNCTOR-23 reverting changes from PATCH-23 as the %23 was breaking URL's in chrome and not really fixing the javadoc links Modified: commons/proper/functor/trunk/src/site/xdoc/aggregator.xml Modified: commons/proper/functor/trunk/src/site/xdoc/aggregator.xml URL: http://svn.apache.org/viewvc/commons/proper/functor/trunk/src/site/xdoc/aggregator.xml?rev=1424224&r1=1424223&r2=1424224&view=diff == --- commons/proper/functor/trunk/src/site/xdoc/aggregator.xml (original) +++ commons/proper/functor/trunk/src/site/xdoc/aggregator.xml Wed Dec 19 23:38:32 2012 @@ -15,10 +15,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY See the License for the specific language governing permissions and limitations under the License. --> - Aggregator @@ -52,7 +48,7 @@ have the hash URL-escaped. The framework allows for any List-based implementation to be plugged in, by -implementing createList(), +implementing createList(), however, there is also an ArrayList-based implementation provided in ArrayListBackedAggregator which can be used out-of-the-box. @@ -61,17 +57,17 @@ have the hash URL-escaped. While the store implementation stores the data in a list, the nostore one stores just a single object -- every time data is fed into the Aggregator, the data stored in this object and the data -passed in +passed in are "aggregated" there and then using the supplied formula and the result of this operation is stored back in the object this implementation uses to store data. This has the implication that unlike the list-backed storage implementation (where the -result of aggregating the data is not known until evaluate() +result of aggregating the data is not known until evaluate() is called), with the nostore implementation the result is known (and saved back) at any moment. This arguably makes this class "faster", however this comes at the cost of a -slower add() +slower add() operation, as the aggregation formula is applied. Also, let's remind ourselves that not all formulas can be implemented using the nostore implementation (see above). @@ -96,9 +92,9 @@ have the hash URL-escaped. AbstractTimedAggregator offers support to start a timer internally to do that. The class offers a listener mechanism where classes can register to receive timer notifications (if timer support was configured) and after all listeners have been - notified the aggregator is reset. + notified the aggregator is reset. The result of - evaluate() + evaluate() (the result of aggregating data) is passed in to the listeners. This allows for an object to simply register itself as a timer listener to the aggregator and only react to the timer notifications (e.g. write the result to a file for offline analysis etc) while the @@ -108,7 +104,7 @@ have the hash URL-escaped. When the data is being flushed/reset, a TimedAggregatorListener can be registered to receive a notification. The notification is sent after the data is reset. -Prior to resetting the data, evaluate() +Prior to resetting the data, evaluate() is called, and the result of the evaluation is sent to the listener. @@ -123,7 +119,7 @@ have the hash URL-escaped. Using a per-instance timer : by default, when using the - 1 + 1 parameter constructor with a value > 0, the aggregator will create a Timer object internally and schedule the regular task of resetting the aggregator under this Timer. While this helps preventing memory leaks @@ -137,18 +133,18 @@ have the hash URL-escaped. href="apidocs/org/apache/commons/functor/aggregator/AbstractTimedAggregator.html#MAIN_TIMER">static timer instance which can be shared amongst all instances of this class, if using the + href="apidocs/org/apache/commons/functor/aggregator/AbstractTimedAggregator.html#AbstractTimedAggregator(long, boolean)">the constructor with 2 params. When doing so, each such instance will schedule its regular reset task against this timer. While this reduces the memory footprint and threading on the system, it can lead to memory leaks if this is not handled correctly. Therefore please make sure you invoke stop() + href="apido
svn commit: r1424159 - in /commons/sandbox/privilizer/trunk: ./ processor/ processor/src/main/java/org/apache/commons/weaver/ processor/src/test/ processor/src/test/java/ processor/src/test/java/org/
Author: struberg Date: Wed Dec 19 21:50:45 2012 New Revision: 1424159 URL: http://svn.apache.org/viewvc?rev=1424159&view=rev Log: add a unit test for a test Weaver Added: commons/sandbox/privilizer/trunk/processor/src/test/ commons/sandbox/privilizer/trunk/processor/src/test/java/ commons/sandbox/privilizer/trunk/processor/src/test/java/org/ commons/sandbox/privilizer/trunk/processor/src/test/java/org/apache/ commons/sandbox/privilizer/trunk/processor/src/test/java/org/apache/commons/ commons/sandbox/privilizer/trunk/processor/src/test/java/org/apache/commons/weaver/ commons/sandbox/privilizer/trunk/processor/src/test/java/org/apache/commons/weaver/test/ commons/sandbox/privilizer/trunk/processor/src/test/java/org/apache/commons/weaver/test/WeaveProcessorTest.java (with props) commons/sandbox/privilizer/trunk/processor/src/test/java/org/apache/commons/weaver/test/WeaverTestBase.java (with props) commons/sandbox/privilizer/trunk/processor/src/test/java/org/apache/commons/weaver/test/beans/ commons/sandbox/privilizer/trunk/processor/src/test/java/org/apache/commons/weaver/test/beans/TestAnnotation.java (with props) commons/sandbox/privilizer/trunk/processor/src/test/java/org/apache/commons/weaver/test/beans/TestBeanWithClassAnnotation.java (with props) commons/sandbox/privilizer/trunk/processor/src/test/java/org/apache/commons/weaver/test/beans/TestBeanWithMethodAnnotation.java (with props) commons/sandbox/privilizer/trunk/processor/src/test/java/org/apache/commons/weaver/test/weaver/ commons/sandbox/privilizer/trunk/processor/src/test/java/org/apache/commons/weaver/test/weaver/TestWeaver.java (with props) commons/sandbox/privilizer/trunk/processor/src/test/resources/ commons/sandbox/privilizer/trunk/processor/src/test/resources/META-INF/ commons/sandbox/privilizer/trunk/processor/src/test/resources/META-INF/services/ commons/sandbox/privilizer/trunk/processor/src/test/resources/META-INF/services/org.apache.commons.weaver.spi.Weaver Modified: commons/sandbox/privilizer/trunk/pom.xml commons/sandbox/privilizer/trunk/processor/pom.xml commons/sandbox/privilizer/trunk/processor/src/main/java/org/apache/commons/weaver/WeaveProcessor.java Modified: commons/sandbox/privilizer/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/sandbox/privilizer/trunk/pom.xml?rev=1424159&r1=1424158&r2=1424159&view=diff == --- commons/sandbox/privilizer/trunk/pom.xml (original) +++ commons/sandbox/privilizer/trunk/pom.xml Wed Dec 19 21:50:45 2012 @@ -54,6 +54,12 @@ mbenson AT apache DOT org Apache + + struberg + Mark Struberg + struberg AT apache DOT org + Apache + @@ -70,16 +76,14 @@ - - - -junit -junit -4.10 -test - - - + + + junit + junit + 4.10 + test + + Modified: commons/sandbox/privilizer/trunk/processor/pom.xml URL: http://svn.apache.org/viewvc/commons/sandbox/privilizer/trunk/processor/pom.xml?rev=1424159&r1=1424158&r2=1424159&view=diff == --- commons/sandbox/privilizer/trunk/processor/pom.xml (original) +++ commons/sandbox/privilizer/trunk/processor/pom.xml Wed Dec 19 21:50:45 2012 @@ -35,7 +35,7 @@ org.apache.xbean - xbean-finder + xbean-finder-shaded 3.12 Modified: commons/sandbox/privilizer/trunk/processor/src/main/java/org/apache/commons/weaver/WeaveProcessor.java URL: http://svn.apache.org/viewvc/commons/sandbox/privilizer/trunk/processor/src/main/java/org/apache/commons/weaver/WeaveProcessor.java?rev=1424159&r1=1424158&r2=1424159&view=diff == --- commons/sandbox/privilizer/trunk/processor/src/main/java/org/apache/commons/weaver/WeaveProcessor.java (original) +++ commons/sandbox/privilizer/trunk/processor/src/main/java/org/apache/commons/weaver/WeaveProcessor.java Wed Dec 19 21:50:45 2012 @@ -103,7 +103,9 @@ public class WeaveProcessor { ClassLoader classLoader = new URLClassLoader(URLArray.fromFiles(classPathsToWeave)); -AnnotationFinder annotationFinder = new AnnotationFinder(new FileArchive(classLoader, target), false); +//X ORIGINAL AnnotationFinder annotationFinder = new AnnotationFinder(new FileArchive(classLoader, target), false); +//X TODO this is a hack for now! +AnnotationFinder annotationFinder = new AnnotationFinder(new FileArchive(classLoader, classPathsToWeave.get(0)), false); for (Class annotation : interest) { List> annotatedClasses = annotationFinder.findAnnotatedClasses(annotation); Added: commons/sandbox/privilizer/trunk/processor/src/test/java/org/apache/com
svn commit: r1424107 - in /commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/differentiation: DSCompilerTest.java DerivativeStructureTest.java FiniteDifferencesDifferentiatorTe
Author: luc Date: Wed Dec 19 21:10:20 2012 New Revision: 1424107 URL: http://svn.apache.org/viewvc?rev=1424107&view=rev Log: Added new tests. Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/differentiation/DSCompilerTest.java commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/differentiation/DerivativeStructureTest.java commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/differentiation/FiniteDifferencesDifferentiatorTest.java Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/differentiation/DSCompilerTest.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/differentiation/DSCompilerTest.java?rev=1424107&r1=1424106&r2=1424107&view=diff == --- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/differentiation/DSCompilerTest.java (original) +++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/differentiation/DSCompilerTest.java Wed Dec 19 21:10:20 2012 @@ -21,6 +21,7 @@ import java.lang.reflect.Field; import java.util.HashMap; import java.util.Map; +import org.apache.commons.math3.exception.DimensionMismatchException; import org.apache.commons.math3.util.ArithmeticUtils; import org.junit.Assert; import org.junit.Test; @@ -128,6 +129,16 @@ public class DSCompilerTest { } +@Test(expected=DimensionMismatchException.class) +public void testIncompatbileParams() { +DSCompiler.getCompiler(3, 2).checkCompatibility(DSCompiler.getCompiler(4, 2)); +} + +@Test(expected=DimensionMismatchException.class) +public void testIncompatbileOrder() { +DSCompiler.getCompiler(3, 3).checkCompatibility(DSCompiler.getCompiler(3, 2)); +} + @Test public void testSymmetry() { for (int i = 0; i < 6; ++i) { Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/differentiation/DerivativeStructureTest.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/differentiation/DerivativeStructureTest.java?rev=1424107&r1=1424106&r2=1424107&view=diff == --- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/differentiation/DerivativeStructureTest.java (original) +++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/analysis/differentiation/DerivativeStructureTest.java Wed Dec 19 21:10:20 2012 @@ -225,24 +225,37 @@ public class DerivativeStructureTest { -2, dsZ, 1, new DerivativeStructure(8, dsZ.multiply(dsX), -1, dsY).pow(3)); +DerivativeStructure dsOther = +new DerivativeStructure(1, dsX, +5, dsX.multiply(dsY), +-2, dsZ).add(new DerivativeStructure(8, dsZ.multiply(dsX), + -1, dsY).pow(3)); double f = x + 5 * x * y - 2 * z + FastMath.pow(8 * z * x - y, 3); Assert.assertEquals(f, ds.getValue(), FastMath.abs(epsilon * f)); +Assert.assertEquals(f, dsOther.getValue(), +FastMath.abs(epsilon * f)); // df/dx = 1 + 5 y + 24 (8 z x - y)^2 z double dfdx = 1 + 5 * y + 24 * z * FastMath.pow(8 * z * x - y, 2); Assert.assertEquals(dfdx, ds.getPartialDerivative(1, 0, 0), FastMath.abs(epsilon * dfdx)); +Assert.assertEquals(dfdx, dsOther.getPartialDerivative(1, 0, 0), +FastMath.abs(epsilon * dfdx)); // df/dxdy = 5 + 48 z*(y - 8 z x) double dfdxdy = 5 + 48 * z * (y - 8 * z * x); Assert.assertEquals(dfdxdy, ds.getPartialDerivative(1, 1, 0), FastMath.abs(epsilon * dfdxdy)); +Assert.assertEquals(dfdxdy, dsOther.getPartialDerivative(1, 1, 0), +FastMath.abs(epsilon * dfdxdy)); // df/dxdydz = 48 (y - 16 z x) double dfdxdydz = 48 * (y - 16 * z * x); Assert.assertEquals(dfdxdydz, ds.getPartialDerivative(1, 1, 1), FastMath.abs(epsilon * dfdxdydz)); +Assert.asse
svn commit: r1424087 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function: Constant.java Cosh.java Identity.java Minus.java Sin.java Sinh.java
Author: luc Date: Wed Dec 19 20:32:50 2012 New Revision: 1424087 URL: http://svn.apache.org/viewvc?rev=1424087&view=rev Log: removed unused import statements Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Constant.java commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Cosh.java commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Identity.java commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Minus.java commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Sin.java commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Sinh.java Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Constant.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Constant.java?rev=1424087&r1=1424086&r2=1424087&view=diff == --- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Constant.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Constant.java Wed Dec 19 20:32:50 2012 @@ -18,8 +18,6 @@ package org.apache.commons.math3.analysis.function; import org.apache.commons.math3.analysis.DifferentiableUnivariateFunction; -import org.apache.commons.math3.analysis.FunctionUtils; -import org.apache.commons.math3.analysis.UnivariateFunction; import org.apache.commons.math3.analysis.differentiation.DerivativeStructure; import org.apache.commons.math3.analysis.differentiation.UnivariateDifferentiableFunction; Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Cosh.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Cosh.java?rev=1424087&r1=1424086&r2=1424087&view=diff == --- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Cosh.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Cosh.java Wed Dec 19 20:32:50 2012 @@ -18,8 +18,6 @@ package org.apache.commons.math3.analysis.function; import org.apache.commons.math3.analysis.DifferentiableUnivariateFunction; -import org.apache.commons.math3.analysis.FunctionUtils; -import org.apache.commons.math3.analysis.UnivariateFunction; import org.apache.commons.math3.analysis.differentiation.DerivativeStructure; import org.apache.commons.math3.analysis.differentiation.UnivariateDifferentiableFunction; import org.apache.commons.math3.util.FastMath; Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Identity.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Identity.java?rev=1424087&r1=1424086&r2=1424087&view=diff == --- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Identity.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Identity.java Wed Dec 19 20:32:50 2012 @@ -18,8 +18,6 @@ package org.apache.commons.math3.analysis.function; import org.apache.commons.math3.analysis.DifferentiableUnivariateFunction; -import org.apache.commons.math3.analysis.FunctionUtils; -import org.apache.commons.math3.analysis.UnivariateFunction; import org.apache.commons.math3.analysis.differentiation.DerivativeStructure; import org.apache.commons.math3.analysis.differentiation.UnivariateDifferentiableFunction; Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Minus.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Minus.java?rev=1424087&r1=1424086&r2=1424087&view=diff == --- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Minus.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/analysis/function/Minus.java Wed Dec 19 20:32:50 2012 @@ -18,8 +18,6 @@ package org.apache.commons.math3.analysis.function; import org.apache.commons.math3.analysis.DifferentiableUnivariateFunction; -import org.apache.commons.math3.analysis.FunctionUtils; -import org.apache.commons.math3.analysis.UnivariateFunction; import org.apache.commons.math3.analysis.differentiation.DerivativeStructure; import org.apache.commons.math3.analysis.differentiation.UnivariateDifferentiableFunction; Modified: commons/pro
svn commit: r1424078 - in /commons/proper/math/trunk/src/test: java/org/apache/commons/math3/complex/ java/org/apache/commons/math3/genetics/ maxima/special/RealFunctionValidation/
Author: luc Date: Wed Dec 19 20:20:29 2012 New Revision: 1424078 URL: http://svn.apache.org/viewvc?rev=1424078&view=rev Log: Adding missing Apache headers. Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/complex/QuaternionTest.java commons/proper/math/trunk/src/test/java/org/apache/commons/math3/genetics/CycleCrossoverTest.java commons/proper/math/trunk/src/test/java/org/apache/commons/math3/genetics/OrderedCrossoverTest.java commons/proper/math/trunk/src/test/maxima/special/RealFunctionValidation/RealFunctionValidation.sh Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/complex/QuaternionTest.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/complex/QuaternionTest.java?rev=1424078&r1=1424077&r2=1424078&view=diff == --- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/complex/QuaternionTest.java (original) +++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/complex/QuaternionTest.java Wed Dec 19 20:20:29 2012 @@ -1,3 +1,19 @@ +/* + * 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.math3.complex; import java.util.Random; Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/genetics/CycleCrossoverTest.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/genetics/CycleCrossoverTest.java?rev=1424078&r1=1424077&r2=1424078&view=diff == --- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/genetics/CycleCrossoverTest.java (original) +++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/genetics/CycleCrossoverTest.java Wed Dec 19 20:20:29 2012 @@ -1,3 +1,19 @@ +/* + * 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.math3.genetics; import org.apache.commons.math3.exception.DimensionMismatchException; Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math3/genetics/OrderedCrossoverTest.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math3/genetics/OrderedCrossoverTest.java?rev=1424078&r1=1424077&r2=1424078&view=diff == --- commons/proper/math/trunk/src/test/java/org/apache/commons/math3/genetics/OrderedCrossoverTest.java (original) +++ commons/proper/math/trunk/src/test/java/org/apache/commons/math3/genetics/OrderedCrossoverTest.java Wed Dec 19 20:20:29 2012 @@ -1,3 +1,19 @@ +/* + * 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
svn commit: r1423916 - in /commons/proper/io/trunk/src: changes/changes.xml main/java/org/apache/commons/io/FileUtils.java test/java/org/apache/commons/io/FileUtilsTestCase.java
Author: ggregory Date: Wed Dec 19 16:17:26 2012 New Revision: 1423916 URL: http://svn.apache.org/viewvc?rev=1423916&view=rev Log: [IO-361] Add API FileUtils.forceMkdirsParent(). Modified: commons/proper/io/trunk/src/changes/changes.xml commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java Modified: commons/proper/io/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/changes/changes.xml?rev=1423916&r1=1423915&r2=1423916&view=diff == --- commons/proper/io/trunk/src/changes/changes.xml (original) +++ commons/proper/io/trunk/src/changes/changes.xml Wed Dec 19 16:17:26 2012 @@ -47,6 +47,9 @@ The type attribute can be add,u + +Add API FileUtils.forceMkdirsParent(). + Add API Charsets.requiredCharsets(). Modified: commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java?rev=1423916&r1=1423915&r2=1423916&view=diff == --- commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java (original) +++ commons/proper/io/trunk/src/main/java/org/apache/commons/io/FileUtils.java Wed Dec 19 16:17:26 2012 @@ -2421,6 +2421,26 @@ public class FileUtils { } } +/** + * Makes any necessary but nonexistent parent directories for a given File. If the parent directory cannot be + * created then an IOException is thrown. + * + * @param file + *file with parent to create, must not be {@code null} + * @throws NullPointerException + * if the file is {@code null} + * @throws IOException + * if the parent directory cannot be created + * @since 2.5 + */ +public static void forceMkdirParent(final File file) throws IOException { +final File parent = file.getParentFile(); +if (parent == null) { +return; +} +forceMkdir(parent); +} + //--- /** * Returns the size of the specified file or directory. If the provided Modified: commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java?rev=1423916&r1=1423915&r2=1423916&view=diff == --- commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java (original) +++ commons/proper/io/trunk/src/test/java/org/apache/commons/io/FileUtilsTestCase.java Wed Dec 19 16:17:26 2012 @@ -746,6 +746,29 @@ public class FileUtilsTestCase extends F assertTrue("Directory was not created.", testFile.exists()); } +public void testForceMkdirParent() throws Exception { +// Tests with existing directory +assertTrue(getTestDirectory().exists()); +final File testParentDir = new File(getTestDirectory(), "testForceMkdirParent"); +try { +testParentDir.delete(); +assertFalse(testParentDir.exists()); +final File testFile = new File(testParentDir, "test.txt"); +assertFalse(testParentDir.exists()); +assertFalse(testFile.exists()); +// Create +FileUtils.forceMkdirParent(testFile); +assertTrue(testParentDir.exists()); +assertFalse(testFile.exists()); +// Again +FileUtils.forceMkdirParent(testFile); +assertTrue(testParentDir.exists()); +assertFalse(testFile.exists()); +} finally { +testParentDir.delete(); +} +} + // sizeOfDirectory public void testSizeOfDirectory() throws Exception {