svn commit: r1189662 - in /commons/proper/compress/trunk/src: main/java/org/apache/commons/compress/archivers/dump/ test/java/org/apache/commons/compress/archivers/dump/
Author: bodewig Date: Thu Oct 27 08:22:48 2011 New Revision: 1189662 URL: http://svn.apache.org/viewvc?rev=1189662&view=rev Log: remove unneeded cast to int in bitwise operations, add tests for convert methods Added: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/dump/ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtilTest.java (with props) Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java?rev=1189662&r1=1189661&r2=1189662&view=diff == --- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java (original) +++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java Thu Oct 27 08:22:48 2011 @@ -108,10 +108,10 @@ class DumpArchiveUtil { */ public static final int convert32(byte[] buffer, int offset) { int i = 0; -i = ((int) buffer[offset + 3]) << 24; -i += (((int) buffer[offset + 2] << 16) & 0x00FF); -i += (((int) buffer[offset + 1] << 8) & 0xFF00); -i += (((int) buffer[offset]) & 0x00FF); +i = buffer[offset + 3] << 24; +i += (buffer[offset + 2] << 16) & 0x00FF; +i += (buffer[offset + 1] << 8) & 0xFF00; +i += buffer[offset] & 0x00FF; return i; } @@ -125,8 +125,8 @@ class DumpArchiveUtil { */ public static final int convert16(byte[] buffer, int offset) { int i = 0; -i += (((int) buffer[offset + 1] << 8) & 0xFF00); -i += (((int) buffer[offset]) & 0x00FF); +i += (buffer[offset + 1] << 8) & 0xFF00; +i += buffer[offset] & 0x00FF; return i; } Added: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtilTest.java URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtilTest.java?rev=1189662&view=auto == --- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtilTest.java (added) +++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtilTest.java Thu Oct 27 08:22:48 2011 @@ -0,0 +1,50 @@ +/* + * 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.compress.archivers.dump; + +import org.junit.Test; +import static org.junit.Assert.assertEquals; + +public class DumpArchiveUtilTest { + +@Test +public void convert64() { +assertEquals(0xABCDEF0123456780L, + DumpArchiveUtil.convert64(new byte[] { + (byte) 0x80, 0x67, 0x45, 0x23, 1, (byte) 0xEF, + (byte) 0xCD, (byte) 0xAB + }, 0)); +} + +@Test +public void convert32() { +assertEquals(0xABCDEF01, + DumpArchiveUtil.convert32(new byte[] { + 1, (byte) 0xEF, (byte) 0xCD, (byte) 0xAB + }, 0)); +} + +@Test +public void convert16() { +assertEquals(0xABCD, + DumpArchiveUtil.convert16(new byte[] { + (byte) 0xCD, (byte) 0xAB + }, 0)); +} +} \ No newline at end of file Propchange: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtilTest.java -- svn:eol-style = native
svn commit: r1189677 - /commons/proper/ognl/trunk/src/benchmarks/java/org/apache/commons/ognl/performance/PerformanceOldOgnlTest.java
Author: mcucchiara Date: Thu Oct 27 08:48:55 2011 New Revision: 1189677 URL: http://svn.apache.org/viewvc?rev=1189677&view=rev Log: PerformanceOldOgnlTest was extending the wrong base class Modified: commons/proper/ognl/trunk/src/benchmarks/java/org/apache/commons/ognl/performance/PerformanceOldOgnlTest.java Modified: commons/proper/ognl/trunk/src/benchmarks/java/org/apache/commons/ognl/performance/PerformanceOldOgnlTest.java URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/benchmarks/java/org/apache/commons/ognl/performance/PerformanceOldOgnlTest.java?rev=1189677&r1=1189676&r2=1189677&view=diff == --- commons/proper/ognl/trunk/src/benchmarks/java/org/apache/commons/ognl/performance/PerformanceOldOgnlTest.java (original) +++ commons/proper/ognl/trunk/src/benchmarks/java/org/apache/commons/ognl/performance/PerformanceOldOgnlTest.java Thu Oct 27 08:48:55 2011 @@ -38,7 +38,7 @@ import org.junit.BeforeClass; @BenchmarkMethodChart( filePrefix = "benchmark-old-ognl" ) @BenchmarkHistoryChart( labelWith = LabelType.CUSTOM_KEY, maxRuns = 20 ) public class PerformanceOldOgnlTest -extends PerformanceCommonsOgnlTest +extends BasePerformanceTest { @BeforeClass public static void before( )
svn commit: r1189680 - in /commons/proper/compress/trunk/src: main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java test/java/org/apache/commons/compress/archivers/dump/DumpArchiv
Author: bodewig Date: Thu Oct 27 08:51:20 2011 New Revision: 1189680 URL: http://svn.apache.org/viewvc?rev=1189680&view=rev Log: Improve test-coverage for DumpArchiveEntry and fix a bug found by doing so Added: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntryTest.java (with props) Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java?rev=1189680&r1=1189679&r2=1189680&view=diff == --- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java (original) +++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntry.java Thu Oct 27 08:51:20 2011 @@ -232,8 +232,9 @@ public class DumpArchiveEntry implements */ protected DumpArchiveEntry(String name, String simpleName, int ino, TYPE type) { -this(name, simpleName); setType(type); +setName(name); +this.simpleName = simpleName; this.ino = ino; this.offset = 0; } Added: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntryTest.java URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntryTest.java?rev=1189680&view=auto == --- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntryTest.java (added) +++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntryTest.java Thu Oct 27 08:51:20 2011 @@ -0,0 +1,43 @@ +/* + * 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.compress.archivers.dump; + +import org.junit.Test; +import static org.junit.Assert.assertEquals; + +public class DumpArchiveEntryTest { +@Test +public void publicNameAddsTrailingSlashForDirectories() { +DumpArchiveEntry ent = new DumpArchiveEntry("foo", "bar", -1, +DumpArchiveEntry.TYPE +.DIRECTORY); +assertEquals("bar", ent.getSimpleName()); +assertEquals("foo", ent.getOriginalName()); +assertEquals("foo/", ent.getName()); +} + +@Test +public void publicNameRemovesLeadingDotSlash() { +DumpArchiveEntry ent = new DumpArchiveEntry("./foo", "bar"); +assertEquals("bar", ent.getSimpleName()); +assertEquals("./foo", ent.getOriginalName()); +assertEquals("foo", ent.getName()); +} + +} \ No newline at end of file Propchange: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveEntryTest.java -- svn:eol-style = native
svn commit: r1189682 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java
Author: bodewig Date: Thu Oct 27 08:53:37 2011 New Revision: 1189682 URL: http://svn.apache.org/viewvc?rev=1189682&view=rev Log: unused code Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java?rev=1189682&r1=1189681&r2=1189682&view=diff == --- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java (original) +++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/dump/DumpArchiveUtil.java Thu Oct 27 08:53:37 2011 @@ -130,28 +130,4 @@ class DumpArchiveUtil { return i; } - -/** - * Dump the start of a block. - * - * @param buffer - */ -public static final void dumpBlock(byte[] buffer) { -for (int i = 0; i < 128; i += 32) { -System.out.printf("%08x ", DumpArchiveUtil.convert32(buffer, i)); -System.out.printf("%08x ", DumpArchiveUtil.convert32(buffer, i + 4)); -System.out.printf("%08x ", DumpArchiveUtil.convert32(buffer, i + 8)); -System.out.printf("%08x - ", -DumpArchiveUtil.convert32(buffer, i + 12)); -System.out.printf("%08x ", DumpArchiveUtil.convert32(buffer, i + -16)); -System.out.printf("%08x ", DumpArchiveUtil.convert32(buffer, i + -20)); -System.out.printf("%08x ", DumpArchiveUtil.convert32(buffer, i + -24)); -System.out.printf("%08x ", DumpArchiveUtil.convert32(buffer, i + -28)); -System.out.println(); -} -} }
svn commit: r1189694 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/EigenDecomposition.java
Author: erans Date: Thu Oct 27 09:53:01 2011 New Revision: 1189694 URL: http://svn.apache.org/viewvc?rev=1189694&view=rev Log: Code and Javadoc formatting. Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/EigenDecomposition.java Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/EigenDecomposition.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/EigenDecomposition.java?rev=1189694&r1=1189693&r2=1189694&view=diff == --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/EigenDecomposition.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/EigenDecomposition.java Thu Oct 27 09:53:01 2011 @@ -55,7 +55,7 @@ import org.apache.commons.math.util.Fast * * * This implementation is based on the paper by A. Drubrulle, R.S. Martin and - * J.H. Wilkinson 'The Implicit QL Algorithm' in Wilksinson and Reinsch (1971) + * J.H. Wilkinson "The Implicit QL Algorithm" in Wilksinson and Reinsch (1971) * Handbook for automatic computation, vol. 2, Linear algebra, Springer-Verlag, * New-York * @@ -65,37 +65,27 @@ import org.apache.commons.math.util.Fast * @since 2.0 (changed to concrete class in 3.0) */ public class EigenDecomposition{ - /** Maximum number of iterations accepted in the implicit QL transformation */ private byte maxIter = 30; - /** Main diagonal of the tridiagonal matrix. */ private double[] main; - /** Secondary diagonal of the tridiagonal matrix. */ private double[] secondary; - /** * Transformer to tridiagonal (may be null if matrix is already * tridiagonal). */ private TriDiagonalTransformer transformer; - /** Real part of the realEigenvalues. */ private double[] realEigenvalues; - /** Imaginary part of the realEigenvalues. */ private double[] imagEigenvalues; - /** Eigenvectors. */ private ArrayRealVector[] eigenvectors; - /** Cached value of V. */ private RealMatrix cachedV; - /** Cached value of D. */ private RealMatrix cachedD; - /** Cached value of Vt. */ private RealMatrix cachedVt; @@ -120,8 +110,8 @@ public class EigenDecomposition{ * Calculates the eigen decomposition of the symmetric tridiagonal * matrix. The Householder matrix is assumed to be the identity matrix. * - * @param main Main diagonal of the symmetric triadiagonal form - * @param secondary Secondary of the tridiagonal form + * @param main Main diagonal of the symmetric tridiagonal form. + * @param secondary Secondary of the tridiagonal form. * @param splitTolerance Dummy parameter (present for backward * compatibility only). * @throws MaxCountExceededException if the algorithm fails to converge. @@ -171,13 +161,14 @@ public class EigenDecomposition{ } /** - * Returns the matrix V of the decomposition. - * V is an orthogonal matrix, i.e. its transpose is also its inverse. - * The columns of V are the eigenvectors of the original matrix. - * No assumption is made about the orientation of the system axes formed + * Gets the matrix V of the decomposition. + * V is an orthogonal matrix, i.e. its transpose is also its inverse. + * The columns of V are the eigenvectors of the original matrix. + * No assumption is made about the orientation of the system axes formed * by the columns of V (e.g. in a 3-dimension space, V can form a left- - * or right-handed system). - * @return the V matrix + * or right-handed system). + * + * @return the V matrix. */ public RealMatrix getV() { @@ -194,11 +185,13 @@ public class EigenDecomposition{ } /** - * Returns the block diagonal matrix D of the decomposition. - * D is a block diagonal matrix. - * Real eigenvalues are on the diagonal while complex values are on - * 2x2 blocks { {real +imaginary}, {-imaginary, real} }. - * @return the D matrix + * Gets the block diagonal matrix D of the decomposition. + * D is a block diagonal matrix. + * Real eigenvalues are on the diagonal while complex values are on + * 2x2 blocks { {real +imaginary}, {-imaginary, real} }. + * + * @return the D matrix. + * * @see #getRealEigenvalues() * @see #getImagEigenvalues() */ @@ -211,13 +204,14 @@ public class EigenDecomposition{ } /** - * Returns the transpose of the matrix V of the decomposition. - * V is an orthogonal matrix, i.e. its transpose is also its inverse. - * The columns of V are the eigenvectors of the original matrix. - * No assumption is made about the orientation of the system axes formed + * Gets the transpose of the matrix V of the decomposition. + * V is an orth
svn commit: r1189695 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/SingularValueDecomposition.java
Author: erans Date: Thu Oct 27 09:59:34 2011 New Revision: 1189695 URL: http://svn.apache.org/viewvc?rev=1189695&view=rev Log: Code formatting. Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/SingularValueDecomposition.java Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/SingularValueDecomposition.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/SingularValueDecomposition.java?rev=1189695&r1=1189694&r2=1189695&view=diff == --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/SingularValueDecomposition.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/SingularValueDecomposition.java Thu Oct 27 09:59:34 2011 @@ -363,9 +363,12 @@ public class SingularValueDecomposition // Perform one qr step. case 3: { // Calculate the shift. -final double scale = FastMath.max(FastMath.max(FastMath.max(FastMath.max( -FastMath.abs(singularValues[p - 1]), FastMath.abs(singularValues[p - 2])), FastMath.abs(e[p - 2])), -FastMath.abs(singularValues[k])), FastMath.abs(e[k])); +final double maxPm1Pm2 = FastMath.max(FastMath.abs(singularValues[p - 1]), + FastMath.abs(singularValues[p - 2])); +final double scale = FastMath.max(FastMath.max(FastMath.max(maxPm1Pm2, + FastMath.abs(e[p - 2])), + FastMath.abs(singularValues[k])), + FastMath.abs(e[k])); final double sp = singularValues[p - 1] / scale; final double spm1 = singularValues[p - 2] / scale; final double epm1 = e[p - 2] / scale;
svn commit: r1189720 - in /commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers: cpio/CpioArchiveOutputStreamTest.java cpio/CpioUtilTest.java dump/DumpArchiveInputStreamTe
Author: bodewig Date: Thu Oct 27 12:32:53 2011 New Revision: 1189720 URL: http://svn.apache.org/viewvc?rev=1189720&view=rev Log: increase test coverage Added: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStreamTest.java (with props) commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/cpio/CpioUtilTest.java (with props) commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/dump/DumpArchiveInputStreamTest.java (with props) Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ZipFileTest.java Added: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStreamTest.java URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStreamTest.java?rev=1189720&view=auto == --- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStreamTest.java (added) +++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStreamTest.java Thu Oct 27 12:32:53 2011 @@ -0,0 +1,68 @@ +/* + * 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.compress.archivers.cpio; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.FileOutputStream; +import java.io.InputStream; + +import org.apache.commons.compress.AbstractTestCase; +import org.apache.commons.compress.utils.IOUtils; + +public class CpioArchiveOutputStreamTest extends AbstractTestCase { + +public void testWriteOldBinary() throws Exception { +final File f = getFile("test1.xml"); +final File output = new File(dir, "test.cpio"); +final FileOutputStream out = new FileOutputStream(output); +InputStream in = null; +try { +final CpioArchiveOutputStream os = +new CpioArchiveOutputStream(out, CpioArchiveOutputStream +.FORMAT_OLD_BINARY); +os.putArchiveEntry(new CpioArchiveEntry(CpioArchiveOutputStream +.FORMAT_OLD_BINARY, +f, "test1.xml")); +IOUtils.copy(in = new FileInputStream(f), os); +in.close(); +in = null; +os.closeArchiveEntry(); +os.close(); +} finally { +if (in != null) { +in.close(); +} +out.close(); +} + +try { +in = new CpioArchiveInputStream(new FileInputStream(output)); +CpioArchiveEntry e = ((CpioArchiveInputStream) in) +.getNextCPIOEntry(); +assertEquals("test1.xml", e.getName()); +assertNull(((CpioArchiveInputStream) in).getNextEntry()); +} finally { +if (in != null) { +in.close(); +} +} +} +} \ No newline at end of file Propchange: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/cpio/CpioArchiveOutputStreamTest.java -- svn:eol-style = native Added: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/cpio/CpioUtilTest.java URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/cpio/CpioUtilTest.java?rev=1189720&view=auto == --- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/cpio/CpioUtilTest.java (added) +++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/cpio/CpioUtilTest.java Thu Oct 27 12:32:53 2011 @@ -0,0 +1,55 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor licens
svn commit: r1189750 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/optimization/ main/java/org/apache/commons/math/optimization/direct/ main/java/org/apache/commons/math/optim
Author: erans Date: Thu Oct 27 13:34:08 2011 New Revision: 1189750 URL: http://svn.apache.org/viewvc?rev=1189750&view=rev Log: MATH-413 Removed "setConvergenceChecker"; convergence checker is passed at construction. Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateRealOptimizer.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateVectorialOptimizer.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseOptimizer.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractScalarOptimizer.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct/BaseAbstractVectorialOptimizer.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/AbstractUnivariateRealOptimizer.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/BrentOptimizer.java commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/univariate/MultiStartUnivariateRealOptimizer.java commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/MultiStartDifferentiableMultivariateRealOptimizerTest.java commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/MultiStartDifferentiableMultivariateVectorialOptimizerTest.java commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/MultiStartMultivariateRealOptimizerTest.java commons/proper/math/trunk/src/test/java/org/apache/commons/math/optimization/general/LevenbergMarquardtOptimizerTest.java Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateRealOptimizer.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateRealOptimizer.java?rev=1189750&r1=1189749&r2=1189750&view=diff == --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateRealOptimizer.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateRealOptimizer.java Thu Oct 27 13:34:08 2011 @@ -127,11 +127,6 @@ public class BaseMultiStartMultivariateR } /** {@inheritDoc} */ -public void setConvergenceChecker(ConvergenceChecker checker) { -optimizer.setConvergenceChecker(checker); -} - -/** {@inheritDoc} */ public ConvergenceChecker getConvergenceChecker() { return optimizer.getConvergenceChecker(); } Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateVectorialOptimizer.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateVectorialOptimizer.java?rev=1189750&r1=1189749&r2=1189750&view=diff == --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateVectorialOptimizer.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseMultiStartMultivariateVectorialOptimizer.java Thu Oct 27 13:34:08 2011 @@ -128,11 +128,6 @@ public class BaseMultiStartMultivariateV } /** {@inheritDoc} */ -public void setConvergenceChecker(ConvergenceChecker checker) { -optimizer.setConvergenceChecker(checker); -} - -/** {@inheritDoc} */ public ConvergenceChecker getConvergenceChecker() { return optimizer.getConvergenceChecker(); } Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseOptimizer.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseOptimizer.java?rev=1189750&r1=1189749&r2=1189750&view=diff == --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseOptimizer.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/BaseOptimizer.java Thu Oct 27 13:34:08 2011 @@ -52,13 +52,6 @@ public interface BaseOptimizer { int getEvaluations(); /** - * Set the convergence checker. - * - * @param checker Object to use to check for convergence. - */ -void setConvergenceChecker(ConvergenceChecker checker); - -/** * Get the convergence checker. * * @return the object used to check for convergence. Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/optimization/direct
svn commit: r1189755 - /commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java
Author: ggregory Date: Thu Oct 27 13:42:47 2011 New Revision: 1189755 URL: http://svn.apache.org/viewvc?rev=1189755&view=rev Log: Add missing ASL header. Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java?rev=1189755&r1=1189754&r2=1189755&view=diff == --- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java (original) +++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java Thu Oct 27 13:42:47 2011 @@ -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.vfs2; import java.util.Collection; @@ -52,7 +68,7 @@ public class FileExtensionSelectorTest { if (BaseFolder != null) { -BaseFolder.delete(Selectors.SELECT_ALL); +BaseFolder.deleteAllDescendents(); } }
svn commit: r1189769 - /commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java
Author: ggregory Date: Thu Oct 27 14:14:34 2011 New Revision: 1189769 URL: http://svn.apache.org/viewvc?rev=1189769&view=rev Log: Don't qualify static with class (code style). Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java?rev=1189769&r1=1189768&r2=1189769&view=diff == --- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java (original) +++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java Thu Oct 27 14:14:34 2011 @@ -81,7 +81,7 @@ public class FileExtensionSelectorTest public void testEmpty() throws Exception { FileSelector selector0 = new FileExtensionSelector(); -FileObject[] foList = FileExtensionSelectorTest.BaseFolder.findFiles(selector0); +FileObject[] foList = BaseFolder.findFiles(selector0); Assert.assertEquals(0, foList.length); } @@ -93,7 +93,7 @@ public class FileExtensionSelectorTest @Test public void testManyExtensions() throws Exception { -FileObject[] foList = FileExtensionSelectorTest.BaseFolder.findFiles(Selectors.SELECT_FILES); +FileObject[] foList = BaseFolder.findFiles(Selectors.SELECT_FILES); Assert.assertTrue(foList.length > 0); // gather file extensions. Set extensionSet = new HashSet(); @@ -105,7 +105,7 @@ public class FileExtensionSelectorTest Assert.assertEquals(ExtensionCount, extensionSet.size()); // check all unique extensions FileSelector selector = new FileExtensionSelector(extensionSet); -FileObject[] list = FileExtensionSelectorTest.BaseFolder.findFiles(selector); +FileObject[] list = BaseFolder.findFiles(selector); Assert.assertEquals(FileCount, list.length); } @@ -118,7 +118,7 @@ public class FileExtensionSelectorTest public void testNullCollection() throws Exception { FileSelector selector0 = new FileExtensionSelector((Collection) null); -FileObject[] foList = FileExtensionSelectorTest.BaseFolder.findFiles(selector0); +FileObject[] foList = BaseFolder.findFiles(selector0); Assert.assertEquals(0, foList.length); } @@ -131,7 +131,7 @@ public class FileExtensionSelectorTest public void testNullString() throws Exception { FileSelector selector0 = new FileExtensionSelector((String) null); -FileObject[] foList = FileExtensionSelectorTest.BaseFolder.findFiles(selector0); +FileObject[] foList = BaseFolder.findFiles(selector0); Assert.assertEquals(0, foList.length); } @@ -143,7 +143,7 @@ public class FileExtensionSelectorTest @Test public void testOneExtension() throws Exception { -FileObject[] foList = FileExtensionSelectorTest.BaseFolder.findFiles(Selectors.SELECT_FILES); +FileObject[] foList = BaseFolder.findFiles(Selectors.SELECT_FILES); Assert.assertTrue(foList.length > 0); // gather file extensions. Set extensionSet = new HashSet(); @@ -156,14 +156,14 @@ public class FileExtensionSelectorTest for (String extension : extensionSet) { FileSelector selector = new FileExtensionSelector(extension); -FileObject[] list = FileExtensionSelectorTest.BaseFolder.findFiles(selector); +FileObject[] list = BaseFolder.findFiles(selector); Assert.assertEquals(FilePerExtensionCount, list.length); } // check each file against itself for (FileObject fo : foList) { FileSelector selector = new FileExtensionSelector(fo.getName().getExtension()); -FileObject[] list = FileExtensionSelectorTest.BaseFolder.findFiles(selector); +FileObject[] list = BaseFolder.findFiles(selector); Assert.assertEquals(FilePerExtensionCount, list.length); } }
svn commit: r1189770 - /commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java
Author: ggregory Date: Thu Oct 27 14:15:55 2011 New Revision: 1189770 URL: http://svn.apache.org/viewvc?rev=1189770&view=rev Log: Better var name. Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java?rev=1189770&r1=1189769&r2=1189770&view=diff == --- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java (original) +++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java Thu Oct 27 14:15:55 2011 @@ -80,8 +80,8 @@ public class FileExtensionSelectorTest @Test public void testEmpty() throws Exception { -FileSelector selector0 = new FileExtensionSelector(); -FileObject[] foList = BaseFolder.findFiles(selector0); +FileSelector selector = new FileExtensionSelector(); +FileObject[] foList = BaseFolder.findFiles(selector); Assert.assertEquals(0, foList.length); }
svn commit: r1189775 - in /commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2: FileExtensionSelectorTest.java FileTypeSelectorTest.java
Author: ggregory Date: Thu Oct 27 14:28:38 2011 New Revision: 1189775 URL: http://svn.apache.org/viewvc?rev=1189775&view=rev Log: New test for FileTypeSelector and Javadoc FileExtensionSelectorTest. Added: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileTypeSelectorTest.java Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java?rev=1189775&r1=1189774&r2=1189775&view=diff == --- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java (original) +++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java Thu Oct 27 14:28:38 2011 @@ -25,6 +25,11 @@ import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; +/** + * Tests FileExtensionSelector. + * + * @since 2.1 + */ public class FileExtensionSelectorTest { private static FileObject BaseFolder; Added: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileTypeSelectorTest.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileTypeSelectorTest.java?rev=1189775&view=auto == --- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileTypeSelectorTest.java (added) +++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileTypeSelectorTest.java Thu Oct 27 14:28:38 2011 @@ -0,0 +1,90 @@ +/* + * 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.vfs2; + +import org.junit.AfterClass; +import org.junit.Assert; +import org.junit.BeforeClass; +import org.junit.Test; + +/** + * Tests FileTypeSelector. + * + * @since 2.1 + */ +public class FileTypeSelectorTest +{ +private static FileObject BaseFolder; + +/** + * Creates a RAM FS. + * + * @throws Exception + */ +@BeforeClass +public static void setUpClass() throws Exception +{ +BaseFolder = VFS.getManager().resolveFile("ram://" + FileTypeSelectorTest.class.getName()); +BaseFolder.resolveFile("root1.html").createFile(); +BaseFolder.resolveFile("root2.html").createFile(); +BaseFolder.resolveFile("f1/a.html").createFile(); +BaseFolder.resolveFile("f2/b.html").createFile(); +BaseFolder.resolveFile("f3/c.html").createFile(); +BaseFolder.resolveFile("f4/").createFolder(); +BaseFolder.resolveFile("f5/").createFolder(); +BaseFolder.resolveFile("f6/f7").createFolder(); +} + +/** + * Deletes RAM FS files. + * + * @throws Exception + */ +@AfterClass +public static void tearDownClass() throws Exception +{ +if (BaseFolder != null) +{ +BaseFolder.deleteAllDescendents(); +} +} + +@Test +public void testFileOrFolders() throws Exception +{ +FileSelector selector = new FileTypeSelector(FileType.FILE_OR_FOLDER); +FileObject[] foList = BaseFolder.findFiles(selector); +// Why 0? +Assert.assertEquals(0, foList.length); +} + +@Test +public void testFiles() throws Exception +{ +FileSelector selector = new FileTypeSelector(FileType.FILE); +FileObject[] foList = BaseFolder.findFiles(selector); +Assert.assertEquals(5, foList.length); +} + +@Test +public void testFolders() throws Exception +{ +FileSelector selector = new FileTypeSelector(FileType.FOLDER); +FileObject[] foList = BaseFolder.findFiles(selector); +Assert.assertEquals(8, foList.length); +} +}
svn commit: r1189777 - in /commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2: FileExtensionSelectorTest.java FileTypeSelectorTest.java
Author: ggregory Date: Thu Oct 27 14:31:33 2011 New Revision: 1189777 URL: http://svn.apache.org/viewvc?rev=1189777&view=rev Log: Oops, backout unrelated change for [VFS-371] Add FileObject API deleteAllDescendents() Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileTypeSelectorTest.java Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java?rev=1189777&r1=1189776&r2=1189777&view=diff == --- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java (original) +++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileExtensionSelectorTest.java Thu Oct 27 14:31:33 2011 @@ -73,7 +73,7 @@ public class FileExtensionSelectorTest { if (BaseFolder != null) { -BaseFolder.deleteAllDescendents(); +BaseFolder.delete(Selectors.SELECT_ALL); } } Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileTypeSelectorTest.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileTypeSelectorTest.java?rev=1189777&r1=1189776&r2=1189777&view=diff == --- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileTypeSelectorTest.java (original) +++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs2/FileTypeSelectorTest.java Thu Oct 27 14:31:33 2011 @@ -59,7 +59,7 @@ public class FileTypeSelectorTest { if (BaseFolder != null) { -BaseFolder.deleteAllDescendents(); +BaseFolder.delete(Selectors.SELECT_ALL); } }
svn commit: r1189887 - in /commons/sandbox/runtime/trunk: build.xml src/build/org/apache/commons/runtime/ant/SystemIdTask.java src/main/java/org/apache/commons/runtime/SystemId.java src/main/native/Ma
Author: mturk Date: Thu Oct 27 17:38:32 2011 New Revision: 1189887 URL: http://svn.apache.org/viewvc?rev=1189887&view=rev Log: Allow creating multilib builds Modified: commons/sandbox/runtime/trunk/build.xml commons/sandbox/runtime/trunk/src/build/org/apache/commons/runtime/ant/SystemIdTask.java commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/SystemId.java commons/sandbox/runtime/trunk/src/main/native/Makefile.unx.in Modified: commons/sandbox/runtime/trunk/build.xml URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/build.xml?rev=1189887&r1=1189886&r2=1189887&view=diff == --- commons/sandbox/runtime/trunk/build.xml (original) +++ commons/sandbox/runtime/trunk/build.xml Thu Oct 27 17:38:32 2011 @@ -302,8 +302,13 @@ The Apache Software Foundation (http://w - - + + + + + + + @@ -451,8 +456,8 @@ The Apache Software Foundation (http://w - - + + @@ -534,8 +539,8 @@ The Apache Software Foundation (http://w fork="yes" failonerror="${test.failonerror}"> - - + + Modified: commons/sandbox/runtime/trunk/src/build/org/apache/commons/runtime/ant/SystemIdTask.java URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/build/org/apache/commons/runtime/ant/SystemIdTask.java?rev=1189887&r1=1189886&r2=1189887&view=diff == --- commons/sandbox/runtime/trunk/src/build/org/apache/commons/runtime/ant/SystemIdTask.java (original) +++ commons/sandbox/runtime/trunk/src/build/org/apache/commons/runtime/ant/SystemIdTask.java Thu Oct 27 17:38:32 2011 @@ -122,7 +122,7 @@ public class SystemIdTask extends Task i syscpu = "x86"; if (name.startsWith("Mac OS")) { if (data.equals("64")) -syscpu = "x86_64"; +syscpu = "x64"; } } else if (arch.startsWith("PA_RISC")) { @@ -132,7 +132,7 @@ public class SystemIdTask extends Task i syscpu = "parisc"; } else if (arch.startsWith("IA64")) -syscpu = "ia64"; +syscpu = "i64"; else if (arch.startsWith("sparc")) { if (data.equals("64")) syscpu = "sparc64"; @@ -146,7 +146,7 @@ public class SystemIdTask extends Task i syscpu = "ppc"; } else if (arch.equals("amd64")) -syscpu = "x86_64"; +syscpu = "x64"; else syscpu = arch; return syscpu; @@ -180,6 +180,38 @@ public class SystemIdTask extends Task i return ext; } +private static String getProcessor32() +{ +getProcessor(); +if (syscpu.equals("x86") || syscpu.equals("x64")) +return "x86"; +if (syscpu.equals("i32") || syscpu.equals("i64")) +return "i32"; +if (syscpu.startsWith("sparc")) +return "sparc"; +if (syscpu.startsWith("ppc")) +return "ppc"; +if (syscpu.startsWith("parisc")) +return "parisc"; +return syscpu; +} + +private static String getProcessor64() +{ +getProcessor(); +if (syscpu.equals("x86") || syscpu.equals("x64")) +return "x64"; +if (syscpu.equals("i32") || syscpu.equals("i64")) +return "i64"; +if (syscpu.startsWith("sparc")) +return "sparc64"; +if (syscpu.startsWith("ppc")) +return "ppc64"; +if (syscpu.startsWith("parisc")) +return "parisc64"; +return syscpu; +} + public void setPrefix(String prefix) { this.prefix = prefix; @@ -207,6 +239,8 @@ public class SystemIdTask extends Task i throw new BuildException("Missing prefix attribute"); getProject().setNewProperty(prefix + ".so", getSoExtension()); getProject().setNewProperty(prefix + ".cpu", getProcessor()); +getProject().setNewProperty(prefix + ".cpu32", getProcessor32()); +getProject().setNewProperty(prefix + ".cpu64", getProcessor64()); getProject().setNewProperty(prefix + ".os", getSysname()); getProject().setNewProperty(prefix + ".data.model", getDataModel()); getProject().setNewProperty(prefix + ".OS", getSysname().toUpperCase()); Modified: commons/sandbox/runtime/trunk/src/main/java/org/apache/commons/runtime/SystemId.java URL: http://svn.apache.org/viewvc
svn commit: r1190141 - /commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java
Author: dbrosius Date: Fri Oct 28 03:28:59 2011 New Revision: 1190141 URL: http://svn.apache.org/viewvc?rev=1190141&view=rev Log: remove dead store Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java?rev=1190141&r1=1190140&r2=1190141&view=diff == --- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java (original) +++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/ri/model/jdom/JDOMNodePointer.java Fri Oct 28 03:28:59 2011 @@ -690,7 +690,6 @@ public class JDOMNodePointer extends Nod List children = ((Element) parent).getContent(); int count = 0; -String name = ((Element) node).getQualifiedName(); for (int i = 0; i < children.size(); i++) { Object child = children.get(i); if (child instanceof Element && matchesQName(((Element) child))) {
svn commit: r1190145 - /commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java
Author: dbrosius Date: Fri Oct 28 03:36:24 2011 New Revision: 1190145 URL: http://svn.apache.org/viewvc?rev=1190145&view=rev Log: guard against npes on exception path Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java?rev=1190145&r1=1190144&r2=1190145&view=diff == --- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java (original) +++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/JXPathBasicBeanInfo.java Fri Oct 28 03:36:24 2011 @@ -120,6 +120,7 @@ public class JXPathBasicBeanInfo impleme } catch (IntrospectionException ex) { ex.printStackTrace(); +return new PropertyDescriptor[0]; } } }
svn commit: r1190147 - /commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java
Author: dbrosius Date: Fri Oct 28 03:51:23 2011 New Revision: 1190147 URL: http://svn.apache.org/viewvc?rev=1190147&view=rev Log: reduce cohesion in the interface, use Set vs. HashSet Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java?rev=1190147&r1=1190146&r2=1190147&view=diff == --- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java (original) +++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java Fri Oct 28 03:51:23 2011 @@ -18,6 +18,7 @@ package org.apache.commons.jxpath.servle import java.util.Enumeration; import java.util.HashSet; +import java.util.Set; import javax.servlet.ServletContext; @@ -35,7 +36,7 @@ public class ServletContextHandler imple private static final int DEFAULT_PROPERTY_COUNT = 16; public String[] getPropertyNames(Object context) { -HashSet list = new HashSet(DEFAULT_PROPERTY_COUNT); +Set list = new HashSet(DEFAULT_PROPERTY_COUNT); collectPropertyNames(list, context); return (String[]) list.toArray(new String[list.size()]); } @@ -45,7 +46,7 @@ public class ServletContextHandler imple * @param set destination * @param bean to read */ -protected void collectPropertyNames(HashSet set, Object bean) { +protected void collectPropertyNames(Set set, Object bean) { Enumeration e = ((ServletContext) bean).getAttributeNames(); while (e.hasMoreElements()) { set.add(e.nextElement());
svn commit: r1190148 - /commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java
Author: dbrosius Date: Fri Oct 28 04:00:29 2011 New Revision: 1190148 URL: http://svn.apache.org/viewvc?rev=1190148&view=rev Log: fix unit test, by checking for bean being a HttpSessionAndServletContext, rather than a ServletContext Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java?rev=1190148&r1=1190147&r2=1190148&view=diff == --- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java (original) +++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/servlet/ServletContextHandler.java Fri Oct 28 04:00:29 2011 @@ -47,6 +47,9 @@ public class ServletContextHandler imple * @param bean to read */ protected void collectPropertyNames(Set set, Object bean) { +if (bean instanceof HttpSessionAndServletContext) { +bean = ((HttpSessionAndServletContext) bean).getServletContext(); +} Enumeration e = ((ServletContext) bean).getAttributeNames(); while (e.hasMoreElements()) { set.add(e.nextElement());
svn commit: r1190150 - /commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/XMLDocumentContainer.java
Author: dbrosius Date: Fri Oct 28 04:02:18 2011 New Revision: 1190150 URL: http://svn.apache.org/viewvc?rev=1190150&view=rev Log: remove unnecessary cast Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/XMLDocumentContainer.java Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/XMLDocumentContainer.java URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/XMLDocumentContainer.java?rev=1190150&r1=1190149&r2=1190150&view=diff == --- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/XMLDocumentContainer.java (original) +++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/XMLDocumentContainer.java Fri Oct 28 04:02:18 2011 @@ -81,7 +81,7 @@ public class XMLDocumentContainer implem Transformer trans = TransformerFactory.newInstance().newTransformer(); trans.transform(source, result); -document = (Document) result.getNode(); +document = result.getNode(); } else { document = delegate.getValue();
svn commit: r1190151 - /commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java
Author: dbrosius Date: Fri Oct 28 04:07:31 2011 New Revision: 1190151 URL: http://svn.apache.org/viewvc?rev=1190151&view=rev Log: remove unused collection Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java Modified: commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java URL: http://svn.apache.org/viewvc/commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java?rev=1190151&r1=1190150&r2=1190151&view=diff == --- commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java (original) +++ commons/proper/jxpath/trunk/src/java/org/apache/commons/jxpath/util/ClassLoaderUtil.java Fri Oct 28 04:07:31 2011 @@ -40,11 +40,6 @@ public class ClassLoaderUtil { * Maps a primitive class name to its corresponding abbreviation used in array class names. */ private static Map abbreviationMap = new HashMap(); - - /** - * Maps an abbreviation used in array class names to corresponding primitive class name. - */ - private static Map reverseAbbreviationMap = new HashMap(); /** * Add primitive type abbreviation to maps of abbreviations. @@ -54,7 +49,6 @@ public class ClassLoaderUtil { */ private static void addAbbreviation(String primitive, String abbreviation) { abbreviationMap.put(primitive, abbreviation); - reverseAbbreviationMap.put(abbreviation, primitive); } /**
Nexus: Staging Repository Dropped.
Description:vote cancelledDetails:The org.apache.commons-101 (u:bodewig, a:93.201.62.251) staging repository has been dropped.
svn commit: r1190154 - /commons/proper/compress/tags/COMPRESS_1.3_RC2/
Author: bodewig Date: Fri Oct 28 04:15:42 2011 New Revision: 1190154 URL: http://svn.apache.org/viewvc?rev=1190154&view=rev Log: Creating a tag for second release candidate of Commons Compress 1.3 Added: commons/proper/compress/tags/COMPRESS_1.3_RC2/ (props changed) - copied from r1190153, commons/proper/compress/trunk/ Propchange: commons/proper/compress/tags/COMPRESS_1.3_RC2/ -- --- subclipse:tags (added) +++ subclipse:tags Fri Oct 28 04:15:42 2011 @@ -0,0 +1 @@ +774629,commons-compress-1.0,/commons/proper/compress/tags/commons-compress-1.0,tag Propchange: commons/proper/compress/tags/COMPRESS_1.3_RC2/ -- --- svn:ignore (added) +++ svn:ignore Fri Oct 28 04:15:42 2011 @@ -0,0 +1,6 @@ +target +*.iml +*.ipr +*.iws +.* +maven-eclipse.xml Propchange: commons/proper/compress/tags/COMPRESS_1.3_RC2/ -- svn:mergeinfo = /commons/proper/compress/branches/zip64:1149597-1152684
svn commit: r1190156 - /commons/proper/compress/tags/COMPRESS_1.3_RC2/pom.xml
Author: bodewig Date: Fri Oct 28 04:18:39 2011 New Revision: 1190156 URL: http://svn.apache.org/viewvc?rev=1190156&view=rev Log: fix version numbers for 1.3RC2 Modified: commons/proper/compress/tags/COMPRESS_1.3_RC2/pom.xml Modified: commons/proper/compress/tags/COMPRESS_1.3_RC2/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/compress/tags/COMPRESS_1.3_RC2/pom.xml?rev=1190156&r1=1190155&r2=1190156&view=diff == --- commons/proper/compress/tags/COMPRESS_1.3_RC2/pom.xml (original) +++ commons/proper/compress/tags/COMPRESS_1.3_RC2/pom.xml Fri Oct 28 04:18:39 2011 @@ -25,7 +25,7 @@ org.apache.commons commons-compress - 1.3-SNAPSHOT + 1.3 Commons Compress http://commons.apache.org/compress/ @@ -41,7 +41,7 @@ 12310904 1.3 -RC1 +RC2
Nexus: Staging Completed.
Description:RC2 for Commons Compress 1.3Details:The following artifacts have been staged to the org.apache.commons-111 (u:bodewig, a:93.201.41.70) repository.archetype-catalog.xmlcommons-compress-1.3.pom.asccommons-compress-1.3.pomcommons-compress-1.3.jar.asccommons-compress-1.3-sources.jar.asccommons-compress-1.3-javadoc.jarcommons-compress-1.3-sources.jarcommons-compress-1.3-javadoc.jar.asccommons-compress-1.3.jar