svn commit: r833705 - in /commons/proper/configuration/branches/configuration2_experimental/src: main/java/org/apache/commons/configuration2/base/ main/java/org/apache/commons/configuration2/base/impl
Author: oheger Date: Sat Nov 7 16:10:40 2009 New Revision: 833705 URL: http://svn.apache.org/viewvc?rev=833705view=rev Log: Added a copy constructor to XMLConfigurationSource. Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/base/InMemoryConfigurationSource.java commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/base/impl/XMLConfigurationSource.java commons/proper/configuration/branches/configuration2_experimental/src/test/java/org/apache/commons/configuration2/base/impl/TestXMLConfigurationSource.java Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/base/InMemoryConfigurationSource.java URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/base/InMemoryConfigurationSource.java?rev=833705r1=833704r2=833705view=diff == --- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/base/InMemoryConfigurationSource.java (original) +++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/base/InMemoryConfigurationSource.java Sat Nov 7 16:10:40 2009 @@ -78,10 +78,7 @@ this(); if (c != null) { -CloneVisitor visitor = new CloneVisitor(); -NodeVisitorAdapter -.visit(visitor, c.getRootNode(), getNodeHandler()); -setRootNode(visitor.getClone()); +setRootNode(copyNodes(c.getRootNode(), NODE_HANDLER)); } } @@ -133,24 +130,71 @@ } /** + * Copies the node structure below the specified root node. This method + * traverses the node structure with a specialized visitor that can create a + * deep clone of all nodes. + * + * @param N the type of the nodes + * @param node the root node of the hierarchy which is to be copied + * @param handler the {...@code NodeHandler} to be used + * @return the root node of the copied structure + */ +protected static N extends ConfigurationNode N copyNodes(N node, +NodeHandlerN handler) +{ +CloneVisitorN visitor = new CloneVisitorN(); +NodeVisitorAdapter.visit(visitor, node, handler); +return visitor.getClone(); +} + +/** + * Clears all reference fields in a node structure. A configuration node can + * store a so-called quot;referencequot;. The meaning of this data is + * determined by a concrete sub class. Typically such references are + * specific for a configuration instance. If this instance is cloned or + * copied, they must be cleared. This can be done using this method. + * + * @param N the type of the nodes + * @param node the root node of the node hierarchy, in which the references + *are to be cleared + * @param handler the {...@code NodeHandler} to be used + */ +protected static N extends ConfigurationNode void clearReferences(N node, +NodeHandlerN handler) +{ +NodeVisitorAdapter.visit(new NodeVisitorAdapterN() +{ +@Override +public void visitBeforeChildren(N node, NodeHandlerN handler) +{ +node.setReference(null); +for (ConfigurationNode attr : node.getAttributes()) +{ +attr.setReference(null); +} +} +}, node, handler); +} + +/** * A specialized visitor that is able to create a deep copy of a node * hierarchy. */ -private static class CloneVisitor extends -NodeVisitorAdapterConfigurationNode +private static class CloneVisitorN extends ConfigurationNode extends +NodeVisitorAdapterN { /** A stack with the actual object to be copied. */ -private StackConfigurationNode copyStack; +private StackN copyStack; /** Stores the result of the clone process. */ -private ConfigurationNode result; +private N result; /** * Creates a new instance of {...@code CloneVisitor}. */ public CloneVisitor() { -copyStack = new StackConfigurationNode(); +copyStack = new StackN(); } /** @@ -159,10 +203,10 @@ * @param node the node */ @Override -public void visitAfterChildren(ConfigurationNode node, -NodeHandlerConfigurationNode handler) +public void visitAfterChildren(N node, +NodeHandlerN handler) { -ConfigurationNode copy = copyStack.pop(); +N
svn commit: r833709 - in /commons/proper/lang/trunk/src: java/org/apache/commons/lang/concurrent/ConcurrentUtils.java test/org/apache/commons/lang/concurrent/ConcurrentUtilsTest.java
Author: oheger Date: Sat Nov 7 16:37:05 2009 New Revision: 833709 URL: http://svn.apache.org/viewvc?rev=833709view=rev Log: [LANG-545] Added ability to create a ConstantFuture object. Thanks to Stephen Colebourne for the patch. Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/concurrent/ConcurrentUtils.java commons/proper/lang/trunk/src/test/org/apache/commons/lang/concurrent/ConcurrentUtilsTest.java Modified: commons/proper/lang/trunk/src/java/org/apache/commons/lang/concurrent/ConcurrentUtils.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/java/org/apache/commons/lang/concurrent/ConcurrentUtils.java?rev=833709r1=833708r2=833709view=diff == --- commons/proper/lang/trunk/src/java/org/apache/commons/lang/concurrent/ConcurrentUtils.java (original) +++ commons/proper/lang/trunk/src/java/org/apache/commons/lang/concurrent/ConcurrentUtils.java Sat Nov 7 16:37:05 2009 @@ -17,6 +17,8 @@ package org.apache.commons.lang.concurrent; import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; /** * p @@ -28,6 +30,7 @@ * @version $Id$ */ public class ConcurrentUtils { + /** * Private constructor so that no instances can be created. This class * contains only static utility methods. @@ -117,4 +120,53 @@ throw (Error) ex.getCause(); } } + +//--- +/** + * p + * Gets an implementation of codeFuture/code that is immediately done + * and returns the specified constant value. + * /p + * p + * This can be useful to return a simple constant immediately from the + * concurrent processing, perhaps as part of avoiding nulls. + * A constant future can also be useful in testing. + * /p + * + * @param value the constant value to return, may be null + * @return an instance of Future that will return the value, never null + */ +public static T FutureT constantFuture(T value) { +return new ConstantFutureT(value); +} + +static final class ConstantFutureT implements FutureT { +/** The constant value. */ +private final T value; + +ConstantFuture(T value) { +this.value = value; +} + +public boolean isDone() { +return true; +} + +public T get() { +return value; +} + +public T get(long timeout, TimeUnit unit) { +return value; +} + +public boolean isCancelled() { +return false; +} + +public boolean cancel(boolean mayInterruptIfRunning) { +return false; +} +} + } Modified: commons/proper/lang/trunk/src/test/org/apache/commons/lang/concurrent/ConcurrentUtilsTest.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/test/org/apache/commons/lang/concurrent/ConcurrentUtilsTest.java?rev=833709r1=833708r2=833709view=diff == --- commons/proper/lang/trunk/src/test/org/apache/commons/lang/concurrent/ConcurrentUtilsTest.java (original) +++ commons/proper/lang/trunk/src/test/org/apache/commons/lang/concurrent/ConcurrentUtilsTest.java Sat Nov 7 16:37:05 2009 @@ -17,6 +17,8 @@ package org.apache.commons.lang.concurrent; import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; import junit.framework.TestCase; @@ -161,4 +163,36 @@ ConcurrentUtils.handleCause(null); ConcurrentUtils.handleCause(new ExecutionException(Test, null)); } + +//--- +/** + * Tests constant future. + */ +public void testConstantFuture_Integer() throws Exception { +Integer value = new Integer(5); +FutureInteger test = ConcurrentUtils.constantFuture(value); +assertEquals(true, test.isDone()); +assertSame(value, test.get()); +assertSame(value, test.get(1000, TimeUnit.SECONDS)); +assertSame(value, test.get(1000, null)); +assertEquals(false, test.isCancelled()); +assertEquals(false, test.cancel(true)); +assertEquals(false, test.cancel(false)); +} + +/** + * Tests constant future. + */ +public void testConstantFuture_null() throws Exception { +Integer value = null; +FutureInteger test = ConcurrentUtils.constantFuture(value); +assertEquals(true, test.isDone()); +assertSame(value, test.get()); +assertSame(value, test.get(1000, TimeUnit.SECONDS)); +assertSame(value, test.get(1000, null)); +assertEquals(false, test.isCancelled()); +assertEquals(false, test.cancel(true)); +
svn commit: r833740 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/linear/EigenDecompositionImpl.java test/java/org/apache/commons/math/linear/EigenDecompositionImplTest.java
Author: luc Date: Sat Nov 7 19:57:02 2009 New Revision: 833740 URL: http://svn.apache.org/viewvc?rev=833740view=rev Log: fixed yet another eigen decomposition bug identified, debugged and fixed by Dimitri! Many thanks to him. Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/EigenDecompositionImpl.java commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/EigenDecompositionImplTest.java Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/EigenDecompositionImpl.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/EigenDecompositionImpl.java?rev=833740r1=833739r2=833740view=diff == --- commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/EigenDecompositionImpl.java (original) +++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/linear/EigenDecompositionImpl.java Sat Nov 7 19:57:02 2009 @@ -837,7 +837,7 @@ } // initial checks for splits (see Parlett Marques section 3.3) -flipIfWarranted(n, 2); +flipEveryOtherIfWarranted(n); // two iterations with Li's test for initial splits initialSplits(n); @@ -1051,7 +1051,7 @@ // step 2: flip array if needed if ((dMin = 0) || (deflatedEnd end)) { -if (flipIfWarranted(deflatedEnd, 1)) { +if (flipAllIfWarranted(deflatedEnd)) { dMin2 = Math.min(dMin2, work[l - 1]); work[l - 1] = Math.min(work[l - 1], @@ -1123,27 +1123,59 @@ } /** - * Flip qd array if warranted. + * Flip all elements of qd array if warranted. * @param n number of rows in the block - * @param step within the array (1 for flipping all elements, 2 for flipping - * only every other element) * @return true if qd array was flipped */ -private boolean flipIfWarranted(final int n, final int step) { -if (1.5 * work[pingPong] work[4 * (n - 1) + pingPong]) { -// flip array -int j = 4 * (n - 1); -for (int i = 0; i j; i += 4) { -for (int k = 0; k 4; k += step) { -final double tmp = work[i + k]; -work[i + k] = work[j - k]; -work[j - k] = tmp; -} -j -= 4; +private boolean flipAllIfWarranted(final int n) { +if (1.5 * work[pingPong] = work[4 * (n - 1) + pingPong]) { +return false; +} + +int j = 4 * (n - 1); +for (int i = 0; i j; i += 4) { +final double tmp1 = work[i]; +work[i] = work[j]; +work[j] = tmp1; +final double tmp2 = work[i+1]; +work[i+1] = work[j+1]; +work[j+1] = tmp2; +final double tmp3 = work[i+2]; +work[i+2] = work[j-2]; +work[j-2] = tmp3; +final double tmp4 = work[i+3]; +work[i+3] = work[j-1]; +work[j-1] = tmp4; +j -= 4; +} + +return true; + +} + +/** + * Flip every other elements of qd array if warranted. + * @param n number of rows in the block + * @return true if qd array was flipped + */ +private boolean flipEveryOtherIfWarranted(final int n) { +if (1.5 * work[pingPong] = work[4 * (n - 1) + pingPong]) { +return false; +} + +// flip array +int j = 4 * (n - 1); +for (int i = 0; i j; i += 4) { +for (int k = 0; k 4; k += 2) { +final double tmp = work[i + k]; +work[i + k] = work[j - k]; +work[j - k] = tmp; } -return true; +j -= 4; } -return false; + +return true; + } /** Modified: commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/EigenDecompositionImplTest.java URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/EigenDecompositionImplTest.java?rev=833740r1=833739r2=833740view=diff == --- commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/EigenDecompositionImplTest.java (original) +++ commons/proper/math/trunk/src/test/java/org/apache/commons/math/linear/EigenDecompositionImplTest.java Sat Nov 7 19:57:02 2009 @@ -188,6 +188,50 @@ } +public void testMathpbx03() { + +double[] mainTridiagonal = { + 1809.0978259647177,3395.4763425956166,1832.1894584712693,3804.364873592377, +806.0482458637571,2403.656427234185,28.48691431556015 +}; +double[] secondaryTridiagonal = { +-656.8932064545833,-469.30804108920734,-1021.7714889369421, +
svn commit: r833756 - /commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BeanProcessor.java
Author: dfabulich Date: Sat Nov 7 20:33:59 2009 New Revision: 833756 URL: http://svn.apache.org/viewvc?rev=833756view=rev Log: Fixing more FindBugs errors Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BeanProcessor.java Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BeanProcessor.java URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BeanProcessor.java?rev=833756r1=833755r2=833756view=diff == --- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BeanProcessor.java (original) +++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BeanProcessor.java Sat Nov 7 20:33:59 2009 @@ -65,14 +65,14 @@ private static final MapClass?, Object primitiveDefaults = new HashMapClass?, Object(); static { -primitiveDefaults.put(Integer.TYPE, new Integer(0)); -primitiveDefaults.put(Short.TYPE, new Short((short) 0)); -primitiveDefaults.put(Byte.TYPE, new Byte((byte) 0)); -primitiveDefaults.put(Float.TYPE, new Float(0)); -primitiveDefaults.put(Double.TYPE, new Double(0)); -primitiveDefaults.put(Long.TYPE, new Long(0)); +primitiveDefaults.put(Integer.TYPE, 0); +primitiveDefaults.put(Short.TYPE, (Short)((short) 0)); +primitiveDefaults.put(Byte.TYPE, (Byte)((byte) 0)); +primitiveDefaults.put(Float.TYPE, (Float)(float)(0)); +primitiveDefaults.put(Double.TYPE, (Double)(double)(0)); +primitiveDefaults.put(Long.TYPE, (Long)(0L)); primitiveDefaults.put(Boolean.TYPE, Boolean.FALSE); -primitiveDefaults.put(Character.TYPE, new Character('\u')); +primitiveDefaults.put(Character.TYPE, '\u'); } /** @@ -449,29 +449,29 @@ } else if ( propType.equals(Integer.TYPE) || propType.equals(Integer.class)) { -return new Integer(rs.getInt(index)); +return (rs.getInt(index)); } else if ( propType.equals(Boolean.TYPE) || propType.equals(Boolean.class)) { -return Boolean.valueOf(rs.getBoolean(index)); +return (rs.getBoolean(index)); } else if (propType.equals(Long.TYPE) || propType.equals(Long.class)) { -return new Long(rs.getLong(index)); +return (rs.getLong(index)); } else if ( propType.equals(Double.TYPE) || propType.equals(Double.class)) { -return new Double(rs.getDouble(index)); +return (rs.getDouble(index)); } else if ( propType.equals(Float.TYPE) || propType.equals(Float.class)) { -return new Float(rs.getFloat(index)); +return (rs.getFloat(index)); } else if ( propType.equals(Short.TYPE) || propType.equals(Short.class)) { -return new Short(rs.getShort(index)); +return (rs.getShort(index)); } else if (propType.equals(Byte.TYPE) || propType.equals(Byte.class)) { -return new Byte(rs.getByte(index)); +return (rs.getByte(index)); } else if (propType.equals(Timestamp.class)) { return rs.getTimestamp(index);
svn commit: r833759 - in /commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils: BasicRowProcessor.java QueryLoader.java
Author: dfabulich Date: Sat Nov 7 20:36:42 2009 New Revision: 833759 URL: http://svn.apache.org/viewvc?rev=833759view=rev Log: Fixing more FindBugs errors Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BasicRowProcessor.java commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryLoader.java Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BasicRowProcessor.java URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BasicRowProcessor.java?rev=833759r1=833758r2=833759view=diff == --- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BasicRowProcessor.java (original) +++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BasicRowProcessor.java Sat Nov 7 20:36:42 2009 @@ -212,7 +212,7 @@ * (That's why we call super.remove(oldKey) and not just * super.put(key, value)) */ -Object oldKey = lowerCaseMap.put(key.toString().toLowerCase(), key); +Object oldKey = lowerCaseMap.put(key.toLowerCase(), key); Object oldValue = super.remove(oldKey); super.put(key, value); return oldValue; Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryLoader.java URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryLoader.java?rev=833759r1=833758r2=833759view=diff == --- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryLoader.java (original) +++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryLoader.java Sat Nov 7 20:36:42 2009 @@ -93,6 +93,7 @@ */ @SuppressWarnings(unchecked) protected MapString,String loadQueries(String path) throws IOException { + // Findbugs flags getClass().getResource as a bad practice; maybe we should change the API? InputStream in = getClass().getResourceAsStream(path); if (in == null) {
svn commit: r833771 - in /commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils: ./ handlers/ wrappers/
Author: dfabulich Date: Sat Nov 7 21:51:22 2009 New Revision: 833771 URL: http://svn.apache.org/viewvc?rev=833771view=rev Log: Fixing CheckStyle errors Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BasicRowProcessor.java commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BeanProcessor.java commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryLoader.java commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/QueryRunner.java commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/ResultSetIterator.java commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/RowProcessor.java commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/AbstractKeyedHandler.java commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/AbstractListHandler.java commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayHandler.java commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ArrayListHandler.java commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/BeanHandler.java commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ColumnListHandler.java commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/KeyedHandler.java commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapHandler.java commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/MapListHandler.java commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/handlers/ScalarHandler.java commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/SqlNullCheckedResultSet.java commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/wrappers/StringTrimmedResultSet.java Modified: commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BasicRowProcessor.java URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BasicRowProcessor.java?rev=833771r1=833770r2=833771view=diff == --- commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BasicRowProcessor.java (original) +++ commons/proper/dbutils/trunk/src/java/org/apache/commons/dbutils/BasicRowProcessor.java Sat Nov 7 21:51:22 2009 @@ -87,6 +87,9 @@ * will be set to codenull/code if the column was SQL NULL. * * @see org.apache.commons.dbutils.RowProcessor#toArray(java.sql.ResultSet) + * @param rs ResultSet that supplies the array data + * @throws SQLException if a database access error occurs + * @return the newly created array */ public Object[] toArray(ResultSet rs) throws SQLException { ResultSetMetaData meta = rs.getMetaData(); @@ -104,7 +107,12 @@ * Convert a codeResultSet/code row into a JavaBean. This * implementation delegates to a BeanProcessor instance. * @see org.apache.commons.dbutils.RowProcessor#toBean(java.sql.ResultSet, java.lang.Class) - * @see org.apache.commons.dbutils.BeanProcessor#toBean(java.sql.ResultSet, java.lang.Class) + * @see org.apache.commons.dbutils.BeanProcessor#toBean(java.sql.ResultSet, java.lang.Class) + * @param T The type of bean to create + * @param rs ResultSet that supplies the bean data + * @param type Class from which to create the bean instance + * @throws SQLException if a database access error occurs + * @return the newly created bean */ public T T toBean(ResultSet rs, ClassT type) throws SQLException { return this.convert.toBean(rs, type); @@ -115,6 +123,12 @@ * This implementation delegates to a BeanProcessor instance. * @see org.apache.commons.dbutils.RowProcessor#toBeanList(java.sql.ResultSet, java.lang.Class) * @see org.apache.commons.dbutils.BeanProcessor#toBeanList(java.sql.ResultSet, java.lang.Class) + * @param T The type of bean to create + * @param rs ResultSet that supplies the bean data + * @param type Class from which to create the bean instance + * @throws SQLException if a database access error occurs + * @return A codeList/code of beans with the given type in the order + * they were returned by the codeResultSet/code. */ public T ListT toBeanList(ResultSet rs, ClassT type) throws SQLException { return this.convert.toBeanList(rs, type); @@ -126,6 +140,9 @@ * names as keys. Calls to codemap.get(COL)/code and * codemap.get(col)/code return the same value. * @see org.apache.commons.dbutils.RowProcessor#toMap(java.sql.ResultSet) + * @param rs ResultSet that supplies the map data + * @throws SQLException if a database access error occurs + * @return the newly created Map */ public MapString, Object toMap(ResultSet rs)
svn commit: r833792 - /commons/proper/dbutils/trunk/pom.xml
Author: dfabulich Date: Sun Nov 8 01:35:45 2009 New Revision: 833792 URL: http://svn.apache.org/viewvc?rev=833792view=rev Log: [maven-release-plugin] prepare release DBUTILS_1_3_RC3 Modified: commons/proper/dbutils/trunk/pom.xml Modified: commons/proper/dbutils/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/pom.xml?rev=833792r1=833791r2=833792view=diff == --- commons/proper/dbutils/trunk/pom.xml [utf-8] (original) +++ commons/proper/dbutils/trunk/pom.xml [utf-8] Sun Nov 8 01:35:45 2009 @@ -24,7 +24,7 @@ modelVersion4.0.0/modelVersion groupIdcommons-dbutils/groupId artifactIdcommons-dbutils/artifactId - version1.4-SNAPSHOT/version + version1.3/version nameCommons DbUtils/name inceptionYear2002/inceptionYear @@ -38,9 +38,9 @@ /issueManagement scm - connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/dbutils/trunk/connection - developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/dbutils/trunk/developerConnection -urlhttp://svn.apache.org/viewvc/commons/proper/dbutils/trunk/url + connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/dbutils/tags/DBUTILS_1_3_RC3/connection + developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/dbutils/tags/DBUTILS_1_3_RC3/developerConnection + urlhttp://svn.apache.org/viewvc/commons/proper/dbutils/tags/DBUTILS_1_3_RC3/url /scm developers
svn commit: r833793 - /commons/proper/dbutils/tags/DBUTILS_1_3_RC3/
Author: dfabulich Date: Sun Nov 8 01:35:49 2009 New Revision: 833793 URL: http://svn.apache.org/viewvc?rev=833793view=rev Log: [maven-scm] copy for tag DBUTILS_1_3_RC3 Added: commons/proper/dbutils/tags/DBUTILS_1_3_RC3/ (props changed) - copied from r833792, commons/proper/dbutils/trunk/ Propchange: commons/proper/dbutils/tags/DBUTILS_1_3_RC3/ -- --- svn:ignore (added) +++ svn:ignore Sun Nov 8 01:35:49 2009 @@ -0,0 +1,5 @@ +target +maven.log +.classpath +.project +*.log Propchange: commons/proper/dbutils/tags/DBUTILS_1_3_RC3/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Sun Nov 8 01:35:49 2009 @@ -0,0 +1,2 @@ +/commons/sandbox/dbutils/bugfixing:741987-747450 +/commons/sandbox/dbutils/java5:741988-832184
svn commit: r833794 - /commons/proper/dbutils/trunk/pom.xml
Author: dfabulich Date: Sun Nov 8 01:35:51 2009 New Revision: 833794 URL: http://svn.apache.org/viewvc?rev=833794view=rev Log: [maven-release-plugin] prepare for next development iteration Modified: commons/proper/dbutils/trunk/pom.xml Modified: commons/proper/dbutils/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/pom.xml?rev=833794r1=833793r2=833794view=diff == --- commons/proper/dbutils/trunk/pom.xml [utf-8] (original) +++ commons/proper/dbutils/trunk/pom.xml [utf-8] Sun Nov 8 01:35:51 2009 @@ -24,7 +24,7 @@ modelVersion4.0.0/modelVersion groupIdcommons-dbutils/groupId artifactIdcommons-dbutils/artifactId - version1.3/version + version1.4-SNAPSHOT/version nameCommons DbUtils/name inceptionYear2002/inceptionYear @@ -38,9 +38,9 @@ /issueManagement scm - connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/dbutils/tags/DBUTILS_1_3_RC3/connection - developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/dbutils/tags/DBUTILS_1_3_RC3/developerConnection - urlhttp://svn.apache.org/viewvc/commons/proper/dbutils/tags/DBUTILS_1_3_RC3/url + connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/dbutils/trunk/connection + developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/dbutils/trunk/developerConnection +urlhttp://svn.apache.org/viewvc/commons/proper/dbutils/trunk/url /scm developers
svn commit: r833795 - /commons/proper/dbutils/tags/DBUTILS_1_3_RC3/
Author: dfabulich Date: Sun Nov 8 01:40:33 2009 New Revision: 833795 URL: http://svn.apache.org/viewvc?rev=833795view=rev Log: Wrong RC3 Removed: commons/proper/dbutils/tags/DBUTILS_1_3_RC3/
svn commit: r833796 - /commons/proper/dbutils/trunk/pom.xml
Author: dfabulich Date: Sun Nov 8 01:40:59 2009 New Revision: 833796 URL: http://svn.apache.org/viewvc?rev=833796view=rev Log: Uploading to RC3 directory Modified: commons/proper/dbutils/trunk/pom.xml Modified: commons/proper/dbutils/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/pom.xml?rev=833796r1=833795r2=833796view=diff == --- commons/proper/dbutils/trunk/pom.xml [utf-8] (original) +++ commons/proper/dbutils/trunk/pom.xml [utf-8] Sun Nov 8 01:40:59 2009 @@ -183,7 +183,7 @@ maven.compile.target1.5/maven.compile.target commons.componentiddbutils/commons.componentid commons.release.version1.3/commons.release.version -commons.rc.versionRC2/commons.rc.version +commons.rc.versionRC3/commons.rc.version commons.binary.suffix / commons.jira.idDBUTILS/commons.jira.id commons.jira.pid12310470/commons.jira.pid
svn commit: r833797 - /commons/proper/dbutils/trunk/pom.xml
Author: dfabulich Date: Sun Nov 8 01:43:29 2009 New Revision: 833797 URL: http://svn.apache.org/viewvc?rev=833797view=rev Log: [maven-release-plugin] prepare release DBUTILS_1_3_RC3 Modified: commons/proper/dbutils/trunk/pom.xml Modified: commons/proper/dbutils/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/pom.xml?rev=833797r1=833796r2=833797view=diff == --- commons/proper/dbutils/trunk/pom.xml [utf-8] (original) +++ commons/proper/dbutils/trunk/pom.xml [utf-8] Sun Nov 8 01:43:29 2009 @@ -24,7 +24,7 @@ modelVersion4.0.0/modelVersion groupIdcommons-dbutils/groupId artifactIdcommons-dbutils/artifactId - version1.4-SNAPSHOT/version + version1.3/version nameCommons DbUtils/name inceptionYear2002/inceptionYear @@ -38,9 +38,9 @@ /issueManagement scm - connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/dbutils/trunk/connection - developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/dbutils/trunk/developerConnection -urlhttp://svn.apache.org/viewvc/commons/proper/dbutils/trunk/url + connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/dbutils/tags/DBUTILS_1_3_RC3/connection + developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/dbutils/tags/DBUTILS_1_3_RC3/developerConnection + urlhttp://svn.apache.org/viewvc/commons/proper/dbutils/tags/DBUTILS_1_3_RC3/url /scm developers
svn commit: r833798 - /commons/proper/dbutils/tags/DBUTILS_1_3_RC3/
Author: dfabulich Date: Sun Nov 8 01:43:32 2009 New Revision: 833798 URL: http://svn.apache.org/viewvc?rev=833798view=rev Log: [maven-scm] copy for tag DBUTILS_1_3_RC3 Added: commons/proper/dbutils/tags/DBUTILS_1_3_RC3/ (props changed) - copied from r833797, commons/proper/dbutils/trunk/ Propchange: commons/proper/dbutils/tags/DBUTILS_1_3_RC3/ -- --- svn:ignore (added) +++ svn:ignore Sun Nov 8 01:43:32 2009 @@ -0,0 +1,5 @@ +target +maven.log +.classpath +.project +*.log Propchange: commons/proper/dbutils/tags/DBUTILS_1_3_RC3/ -- --- svn:mergeinfo (added) +++ svn:mergeinfo Sun Nov 8 01:43:32 2009 @@ -0,0 +1,2 @@ +/commons/sandbox/dbutils/bugfixing:741987-747450 +/commons/sandbox/dbutils/java5:741988-832184
svn commit: r833799 - /commons/proper/dbutils/trunk/pom.xml
Author: dfabulich Date: Sun Nov 8 01:43:34 2009 New Revision: 833799 URL: http://svn.apache.org/viewvc?rev=833799view=rev Log: [maven-release-plugin] prepare for next development iteration Modified: commons/proper/dbutils/trunk/pom.xml Modified: commons/proper/dbutils/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/dbutils/trunk/pom.xml?rev=833799r1=833798r2=833799view=diff == --- commons/proper/dbutils/trunk/pom.xml [utf-8] (original) +++ commons/proper/dbutils/trunk/pom.xml [utf-8] Sun Nov 8 01:43:34 2009 @@ -24,7 +24,7 @@ modelVersion4.0.0/modelVersion groupIdcommons-dbutils/groupId artifactIdcommons-dbutils/artifactId - version1.3/version + version1.4-SNAPSHOT/version nameCommons DbUtils/name inceptionYear2002/inceptionYear @@ -38,9 +38,9 @@ /issueManagement scm - connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/dbutils/tags/DBUTILS_1_3_RC3/connection - developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/dbutils/tags/DBUTILS_1_3_RC3/developerConnection - urlhttp://svn.apache.org/viewvc/commons/proper/dbutils/tags/DBUTILS_1_3_RC3/url + connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/dbutils/trunk/connection + developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/dbutils/trunk/developerConnection +urlhttp://svn.apache.org/viewvc/commons/proper/dbutils/trunk/url /scm developers
svn commit: r833829 - in /commons/proper/vfs/trunk: core/src/test/java/org/apache/commons/vfs/provider/test/ core/src/test/java/org/apache/commons/vfs/test/ xdocs/
Author: rgoers Date: Sun Nov 8 05:16:14 2009 New Revision: 833829 URL: http://svn.apache.org/viewvc?rev=833829view=rev Log: Apply patch for VFS-276 Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/provider/test/JunctionProviderConfig.java commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestCase.java commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestConfig.java commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractTestSuite.java commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/ProviderTestConfig.java commons/proper/vfs/trunk/xdocs/changes.xml Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/provider/test/JunctionProviderConfig.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/provider/test/JunctionProviderConfig.java?rev=833829r1=833828r2=833829view=diff == --- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/provider/test/JunctionProviderConfig.java (original) +++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/provider/test/JunctionProviderConfig.java Sun Nov 8 05:16:14 2009 @@ -39,6 +39,13 @@ { this.config = config; } + +/** +* Returns a DefaultFileSystemManager instance (or subclass instance). +*/ + public DefaultFileSystemManager getDefaultFileSystemManager() { + return config.getDefaultFileSystemManager(); + } public FilesCache getFilesCache() { Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestCase.java?rev=833829r1=833828r2=833829view=diff == --- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestCase.java (original) +++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestCase.java Sun Nov 8 05:16:14 2009 @@ -103,7 +103,7 @@ */ protected DefaultFileSystemManager createManager() throws Exception { - DefaultFileSystemManager fs = new DefaultFileSystemManager(); + DefaultFileSystemManager fs = getProviderConfig().getDefaultFileSystemManager(); fs.setFilesCache(getProviderConfig().getFilesCache()); getProviderConfig().prepare(fs); if (!fs.hasProvider(file)) Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestConfig.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestConfig.java?rev=833829r1=833828r2=833829view=diff == --- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestConfig.java (original) +++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestConfig.java Sun Nov 8 05:16:14 2009 @@ -30,6 +30,13 @@ implements ProviderTestConfig { private FilesCache cache = null; + +/** +* Returns a DefaultFileSystemManager instance (or subclass instance). +*/ + public DefaultFileSystemManager getDefaultFileSystemManager() { + return new DefaultFileSystemManager(); + } /** * Prepares the file system manager. This implementation does nothing. Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractTestSuite.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractTestSuite.java?rev=833829r1=833828r2=833829view=diff == --- commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractTestSuite.java (original) +++ commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/AbstractTestSuite.java Sun Nov 8 05:16:14 2009 @@ -148,7 +148,7 @@ checkTempDir(Temp dir not empty before test); // Create the file system manager -manager = new DefaultFileSystemManager(); +manager = providerConfig.getDefaultFileSystemManager(); manager.setFilesCache(providerConfig.getFilesCache()); final DefaultFileReplicator replicator = new DefaultFileReplicator(tempDir); Modified: commons/proper/vfs/trunk/core/src/test/java/org/apache/commons/vfs/test/ProviderTestConfig.java URL:
svn commit: r833830 - in /commons/proper/vfs/branches/VFS281: core/src/test/java/org/apache/commons/vfs/provider/test/ core/src/test/java/org/apache/commons/vfs/test/ xdocs/
Author: rgoers Date: Sun Nov 8 05:16:27 2009 New Revision: 833830 URL: http://svn.apache.org/viewvc?rev=833830view=rev Log: Apply patch for VFS-276 Modified: commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/provider/test/JunctionProviderConfig.java commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestCase.java commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestConfig.java commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/test/AbstractTestSuite.java commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/test/ProviderTestConfig.java commons/proper/vfs/branches/VFS281/xdocs/changes.xml Modified: commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/provider/test/JunctionProviderConfig.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/provider/test/JunctionProviderConfig.java?rev=833830r1=833829r2=833830view=diff == --- commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/provider/test/JunctionProviderConfig.java (original) +++ commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/provider/test/JunctionProviderConfig.java Sun Nov 8 05:16:27 2009 @@ -39,6 +39,13 @@ { this.config = config; } + +/** +* Returns a DefaultFileSystemManager instance (or subclass instance). +*/ + public DefaultFileSystemManager getDefaultFileSystemManager() { + return config.getDefaultFileSystemManager(); + } public FilesCache getFilesCache() { Modified: commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestCase.java?rev=833830r1=833829r2=833830view=diff == --- commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestCase.java (original) +++ commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestCase.java Sun Nov 8 05:16:27 2009 @@ -103,7 +103,7 @@ */ protected DefaultFileSystemManager createManager() throws Exception { - DefaultFileSystemManager fs = new DefaultFileSystemManager(); + DefaultFileSystemManager fs = getProviderConfig().getDefaultFileSystemManager(); fs.setFilesCache(getProviderConfig().getFilesCache()); getProviderConfig().prepare(fs); if (!fs.hasProvider(file)) Modified: commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestConfig.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestConfig.java?rev=833830r1=833829r2=833830view=diff == --- commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestConfig.java (original) +++ commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/test/AbstractProviderTestConfig.java Sun Nov 8 05:16:27 2009 @@ -30,6 +30,13 @@ implements ProviderTestConfig { private FilesCache cache = null; + +/** +* Returns a DefaultFileSystemManager instance (or subclass instance). +*/ + public DefaultFileSystemManager getDefaultFileSystemManager() { + return new DefaultFileSystemManager(); + } /** * Prepares the file system manager. This implementation does nothing. Modified: commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/test/AbstractTestSuite.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/test/AbstractTestSuite.java?rev=833830r1=833829r2=833830view=diff == --- commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/test/AbstractTestSuite.java (original) +++ commons/proper/vfs/branches/VFS281/core/src/test/java/org/apache/commons/vfs/test/AbstractTestSuite.java Sun Nov 8 05:16:27 2009 @@ -148,7 +148,7 @@ checkTempDir(Temp dir not empty before test); // Create the file system manager -manager = new DefaultFileSystemManager(); +manager = providerConfig.getDefaultFileSystemManager(); manager.setFilesCache(providerConfig.getFilesCache()); final
svn commit: r833831 - in /commons/proper/vfs/trunk: core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java xdocs/changes.xml
Author: rgoers Date: Sun Nov 8 05:37:10 2009 New Revision: 833831 URL: http://svn.apache.org/viewvc?rev=833831view=rev Log: Apply patch for VFS-261 Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java commons/proper/vfs/trunk/xdocs/changes.xml Modified: commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java?rev=833831r1=833830r2=833831view=diff == --- commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java (original) +++ commons/proper/vfs/trunk/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java Sun Nov 8 05:37:10 2009 @@ -21,7 +21,7 @@ import org.apache.commons.httpclient.HttpMethod; import org.apache.commons.httpclient.URIException; import org.apache.commons.httpclient.methods.RequestEntity; -import org.apache.commons.httpclient.methods.StringRequestEntity; +import org.apache.commons.httpclient.methods.ByteArrayRequestEntity; import org.apache.commons.httpclient.util.DateUtil; import org.apache.commons.vfs.provider.URLFileName; import org.apache.commons.vfs.provider.DefaultFileContent; @@ -566,7 +566,7 @@ */ protected void onClose() throws IOException { -RequestEntity entity = new StringRequestEntity(out.toString()); +RequestEntity entity = new ByteArrayRequestEntity(((ByteArrayOutputStream) out).toByteArray()); URLFileName fileName = (URLFileName) getName(); String urlStr = urlString(fileName); if (builder.isVersioning(getFileSystem().getFileSystemOptions())) Modified: commons/proper/vfs/trunk/xdocs/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/vfs/trunk/xdocs/changes.xml?rev=833831r1=833830r2=833831view=diff == --- commons/proper/vfs/trunk/xdocs/changes.xml (original) +++ commons/proper/vfs/trunk/xdocs/changes.xml Sun Nov 8 05:37:10 2009 @@ -23,6 +23,9 @@ body release version=2.0 date=in SVN description= + action dev=rgoers type=fix issue=VFS-261 due-to=Simon Olofsson +WebDAV upload corrupts binary files + /action action dev=rgoers type=fix issue=VFS-276 due-to=Vince Bonfanti add ProviderTestConfig.getDefaultFileSystemManager() method /action
svn commit: r833832 - in /commons/proper/vfs/branches/VFS281: core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java xdocs/changes.xml
Author: rgoers Date: Sun Nov 8 05:37:23 2009 New Revision: 833832 URL: http://svn.apache.org/viewvc?rev=833832view=rev Log: Apply patch for VFS-261 Modified: commons/proper/vfs/branches/VFS281/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java commons/proper/vfs/branches/VFS281/xdocs/changes.xml Modified: commons/proper/vfs/branches/VFS281/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java URL: http://svn.apache.org/viewvc/commons/proper/vfs/branches/VFS281/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java?rev=833832r1=833831r2=833832view=diff == --- commons/proper/vfs/branches/VFS281/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java (original) +++ commons/proper/vfs/branches/VFS281/core/src/main/java/org/apache/commons/vfs/provider/webdav/WebdavFileObject.java Sun Nov 8 05:37:23 2009 @@ -21,7 +21,7 @@ import org.apache.commons.httpclient.HttpMethod; import org.apache.commons.httpclient.URIException; import org.apache.commons.httpclient.methods.RequestEntity; -import org.apache.commons.httpclient.methods.StringRequestEntity; +import org.apache.commons.httpclient.methods.ByteArrayRequestEntity; import org.apache.commons.httpclient.util.DateUtil; import org.apache.commons.vfs.provider.URLFileName; import org.apache.commons.vfs.provider.DefaultFileContent; @@ -562,7 +562,7 @@ */ protected void onClose() throws IOException { -RequestEntity entity = new StringRequestEntity(out.toString()); +RequestEntity entity = new ByteArrayRequestEntity(((ByteArrayOutputStream) out).toByteArray()); URLFileName fileName = (URLFileName) getName(); String urlStr = urlString(fileName); WebdavFileSystemOptions opts = fileSystem.getFileSystemOptions(); Modified: commons/proper/vfs/branches/VFS281/xdocs/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/vfs/branches/VFS281/xdocs/changes.xml?rev=833832r1=833831r2=833832view=diff == --- commons/proper/vfs/branches/VFS281/xdocs/changes.xml (original) +++ commons/proper/vfs/branches/VFS281/xdocs/changes.xml Sun Nov 8 05:37:23 2009 @@ -23,6 +23,9 @@ body release version=2.0 date=in SVN description= + action dev=rgoers type=fix issue=VFS-261 due-to=Simon Olofsson +WebDAV upload corrupts binary files + /action action dev=rgoers type=fix issue=VFS-276 due-to=Vince Bonfanti add ProviderTestConfig.getDefaultFileSystemManager() method /action