svn commit: r1527276 - in /commons/proper/compress/trunk/src: changes/changes.xml site/xdoc/examples.xml site/xdoc/index.xml
Author: bodewig Date: Sun Sep 29 06:35:11 2013 New Revision: 1527276 URL: http://svn.apache.org/r1527276 Log: properly document the current level of support provided for 7z Modified: commons/proper/compress/trunk/src/changes/changes.xml commons/proper/compress/trunk/src/site/xdoc/examples.xml commons/proper/compress/trunk/src/site/xdoc/index.xml Modified: commons/proper/compress/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/changes/changes.xml?rev=1527276r1=1527275r2=1527276view=diff == --- commons/proper/compress/trunk/src/changes/changes.xml (original) +++ commons/proper/compress/trunk/src/changes/changes.xml Sun Sep 29 06:35:11 2013 @@ -51,7 +51,8 @@ The action type attribute can be add,u /action action type=add date=2013-05-07 issue=COMPRESS-54 due-to=Damjan Jovanovic -Added support for 7z archives. +Added support for 7z archives. Most compression algorithms +can be read, but only uncompressed archives can be written. /action action type=add date=2013-05-19 issue=COMPRESS-226 due-to=Damjan Jovanovic @@ -102,6 +103,9 @@ The action type attribute can be add,u The CPIO streams now support an encoding parameter that can be used to specify the encoding of file names. /action + action type=fix date=2013-09-22 issue=COMPRESS-111 +Read-only support for LZMA standalone compression has been added. + /action /release release version=1.5 date=2013-03-14 description=Release 1.5 Modified: commons/proper/compress/trunk/src/site/xdoc/examples.xml URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/site/xdoc/examples.xml?rev=1527276r1=1527275r2=1527276view=diff == --- commons/proper/compress/trunk/src/site/xdoc/examples.xml (original) +++ commons/proper/compress/trunk/src/site/xdoc/examples.xml Sun Sep 29 06:35:11 2013 @@ -31,13 +31,16 @@ collect multiple entries inside a single (potentially compressed) archive are archiver formats./p -pThe compressor formats supported are gzip, bzip2, xz, lzma and -Pack200, the archiver formats are ar, cpio, tar and zip as -well as dump, 7z and arj for which we currently only support -reading. Pack200 is a special case as it can only compress -JAR files./p - -pWe currently only provide read support for lzma as well./p +pThe compressor formats supported are gzip, bzip2, xz, lzma +and Pack200, the archiver formats are 7z, ar, arj, cpio, dump, +tar and zip. Pack200 is a special case as it can only +compress JAR files./p + +pWe currently only provide read support for lzma, arj and +dump. arj can only read uncompressed archives, 7z can read +archives with many compression and encryption algorithms +supported by 7z but can only write uncompressed and +unencrypted archives./p /subsection subsection name=Common Notes @@ -458,9 +461,10 @@ lzmaIn.close(); subsection name=7z pNote that Commons Compress currently only supports -uncompressed entries or entries compressed using BZIP2 or -LZMA2 and no header compression at all. Only AES-256/SHA-256 -are supported for encryption./p +a subset of compression and encryption algorithms used for 7z +archives. For reading only uncompressed entries of LZMA, +LZMA2, BZIP2 and AES-256/SHA-256 are supported. Only +uncompressed and unencrypted archives can be written./p pAdding an entry to a 7z archive:/p source![CDATA[ Modified: commons/proper/compress/trunk/src/site/xdoc/index.xml URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/site/xdoc/index.xml?rev=1527276r1=1527275r2=1527276view=diff == --- commons/proper/compress/trunk/src/site/xdoc/index.xml (original) +++ commons/proper/compress/trunk/src/site/xdoc/index.xml Sun Sep 29 06:35:11 2013 @@ -78,7 +78,10 @@ implementation provides capabilities that go beyond the features found in java.util.zip. As of Commons Compress 1.6 support for the dump and arj formats is -read-only./p +read-only - 7z can read most compressed and encrypted +archives but only write uncompressed ones. LZMA(2) supprt +in 7z requires a href=http://tukaani.org/xz/java.html;XZ for +Java/a as well./p pThe compress component provides abstract base classes for compressors and archivers together with factories that can
svn commit: r1527360 - /commons/proper/configuration/trunk/src/changes/changes.xml
Author: oheger Date: Sun Sep 29 17:35:28 2013 New Revision: 1527360 URL: http://svn.apache.org/r1527360 Log: Updated changes.xml. Modified: commons/proper/configuration/trunk/src/changes/changes.xml Modified: commons/proper/configuration/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/changes/changes.xml?rev=1527360r1=1527359r2=1527360view=diff == --- commons/proper/configuration/trunk/src/changes/changes.xml (original) +++ commons/proper/configuration/trunk/src/changes/changes.xml Sun Sep 29 17:35:28 2013 @@ -33,6 +33,13 @@ a default instance which can be obtained via the BeanHelper.INSTANCE field. /action + action dev=oheger type=update issue=CONFIGURATION-553 +The code for accessing configuration files hs been reworked. Methods +related to locating configuration files have been moved from +ConfigurationUtils to a new FileLocatorUtils class. Customizable +strategy classes (implementing the new FileLocationStrategy) can be +used for searching for configuration files. + /action action dev=oheger type=add issue=CONFIGURATION-551 The data type conversion mechanism has been made extensible. There is a new interface ConversionHandler which controls the data type conversions @@ -192,6 +199,10 @@ action dev=oheger type=update issue=CONFIGURATION-330 Concurrent access to configurations has been reworked. /action + action dev=oheger type=update issue=CONFIGURATION-153 +It is now possible to define the strategy used for locating +configuration files. + /action action dev=oheger type=update issue=CONFIGURATION-26 It is now possible to influence the conversion from a container object (a collection or an array) to a single value (e.g. what is returned by
svn commit: r1527363 - in /commons/proper/configuration/trunk/src/test: java/org/apache/commons/configuration/io/TestDefaultFileSystem.java resources/testCCFileSystemSubConfig.xml
Author: oheger Date: Sun Sep 29 17:41:26 2013 New Revision: 1527363 URL: http://svn.apache.org/r1527363 Log: Missing svn properties. Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/io/TestDefaultFileSystem.java (contents, props changed) commons/proper/configuration/trunk/src/test/resources/testCCFileSystemSubConfig.xml (props changed) Modified: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/io/TestDefaultFileSystem.java URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/io/TestDefaultFileSystem.java?rev=1527363r1=1527362r2=1527363view=diff == --- commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/io/TestDefaultFileSystem.java (original) +++ commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/io/TestDefaultFileSystem.java Sun Sep 29 17:41:26 2013 @@ -30,7 +30,7 @@ import org.junit.Test; * functionality. Other parts are tested by actual access to configuration files * in other test classes. * - * @version $Id: $ + * @version $Id$ */ public class TestDefaultFileSystem { Propchange: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/io/TestDefaultFileSystem.java -- svn:eol-style = native Propchange: commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/io/TestDefaultFileSystem.java -- svn:keywords = Author Id Revision HeadURL Propchange: commons/proper/configuration/trunk/src/test/resources/testCCFileSystemSubConfig.xml -- svn:eol-style = native Propchange: commons/proper/configuration/trunk/src/test/resources/testCCFileSystemSubConfig.xml -- svn:keywords = Author Id Revision HeadURL
svn commit: r1527373 - in /commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3: StringUtils.java text/StrSubstitutor.java
Author: ggregory Date: Sun Sep 29 18:06:03 2013 New Revision: 1527373 URL: http://svn.apache.org/r1527373 Log: Eat own dog food: use StringUtils.isEmpty(). Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java?rev=1527373r1=1527372r2=1527373view=diff == --- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java (original) +++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/StringUtils.java Sun Sep 29 18:06:03 2013 @@ -5737,7 +5737,7 @@ public class StringUtils { * @since 3.0 Changed to return false and not true */ public static boolean isAlpha(final CharSequence cs) { -if (cs == null || cs.length() == 0) { +if (isEmpty(cs)) { return false; } final int sz = cs.length(); @@ -5807,7 +5807,7 @@ public class StringUtils { * @since 3.0 Changed to return false and not true */ public static boolean isAlphanumeric(final CharSequence cs) { -if (cs == null || cs.length() == 0) { +if (isEmpty(cs)) { return false; } final int sz = cs.length(); @@ -5924,7 +5924,7 @@ public class StringUtils { * @since 3.0 Changed to return false and not true */ public static boolean isNumeric(final CharSequence cs) { -if (cs == null || cs.length() == 0) { +if (isEmpty(cs)) { return false; } final int sz = cs.length(); Modified: commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java URL: http://svn.apache.org/viewvc/commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java?rev=1527373r1=1527372r2=1527373view=diff == --- commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java (original) +++ commons/proper/lang/trunk/src/main/java/org/apache/commons/lang3/text/StrSubstitutor.java Sun Sep 29 18:06:03 2013 @@ -23,6 +23,8 @@ import java.util.List; import java.util.Map; import java.util.Properties; +import org.apache.commons.lang3.StringUtils; + /** * Substitutes variables within a string by values. * p @@ -1126,7 +1128,7 @@ public class StrSubstitutor { * @return this, to enable chaining */ public StrSubstitutor setValueDelimiter(final String valueDelimiter) { -if (valueDelimiter == null || valueDelimiter.length() == 0) { +if (StringUtils.isEmpty(valueDelimiter)) { setValueDelimiterMatcher(null); return this; }
svn commit: r1527396 - in /commons/proper/configuration/trunk/src: changes/changes.xml main/java/org/apache/commons/configuration/XMLConfiguration.java test/java/org/apache/commons/configuration/TestX
Author: oheger Date: Sun Sep 29 20:12:54 2013 New Revision: 1527396 URL: http://svn.apache.org/r1527396 Log: [CONFIGURATION-555] Fixed a problem with the handling of the xml:space attribute. The attribute was only evaluated for sub elements, but not for the current element. However, now there is a corner case of an element which only contains sub elements and has the attribute set to preserve. In this case, a trim is done because it does not make sense to assign a value consisting only of whitespace to this element. Modified: commons/proper/configuration/trunk/src/changes/changes.xml commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/XMLConfiguration.java commons/proper/configuration/trunk/src/test/java/org/apache/commons/configuration/TestXMLConfiguration.java commons/proper/configuration/trunk/src/test/resources/test.xml Modified: commons/proper/configuration/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/changes/changes.xml?rev=1527396r1=1527395r2=1527396view=diff == --- commons/proper/configuration/trunk/src/changes/changes.xml (original) +++ commons/proper/configuration/trunk/src/changes/changes.xml Sun Sep 29 20:12:54 2013 @@ -27,6 +27,11 @@ body release version=2.0 date=in SVN description=TBD + action dev=oheger type=update issue=CONFIGURATION-555 +Fixed a bug in the handling of the xml:space attribute in +XMLConfiguration. The attribute is now also applied to the current +element, not only to sub elements. + /action action dev=oheger type=update issue=CONFIGURATION-554 BeanHelper is no longer a static utility class. Instances can be created with a specific configuration of bean factories. There is still Modified: commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/XMLConfiguration.java URL: http://svn.apache.org/viewvc/commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/XMLConfiguration.java?rev=1527396r1=1527395r2=1527396view=diff == --- commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/XMLConfiguration.java (original) +++ commons/proper/configuration/trunk/src/main/java/org/apache/commons/configuration/XMLConfiguration.java Sun Sep 29 20:12:54 2013 @@ -26,7 +26,6 @@ import java.io.Writer; import java.net.URL; import java.util.ArrayList; import java.util.Collection; -import java.util.Collections; import java.util.HashMap; import java.util.Iterator; import java.util.List; @@ -53,6 +52,7 @@ import org.apache.commons.configuration. import org.apache.commons.configuration.resolver.EntityRegistry; import org.apache.commons.configuration.tree.ConfigurationNode; import org.apache.commons.configuration.tree.DefaultConfigurationNode; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.LogFactory; import org.w3c.dom.Attr; import org.w3c.dom.CDATASection; @@ -544,10 +544,13 @@ public class XMLConfiguration extends Ba * * @param node the actual node * @param element the actual XML element - * @param elemRefs a flag whether references to the XML elements should be set - * @param trim a flag whether the text content of elements should be trimmed; - * this controls the whitespace handling - * @return a map with all attribute values extracted for the current node + * @param elemRefs a flag whether references to the XML elements should be + *set + * @param trim a flag whether the text content of elements should be + *trimmed; this controls the whitespace handling + * @return a map with all attribute values extracted for the current node; + * this map also contains the value of the trim flag for this node + * under the key {@value #ATTR_SPACE} */ private MapString, String constructHierarchy(ConfigurationNode node, Element element, boolean elemRefs, boolean trim) @@ -555,6 +558,7 @@ public class XMLConfiguration extends Ba boolean trimFlag = shouldTrim(element, trim); MapString, String attributes = processAttributes(node, element, elemRefs); +attributes.put(ATTR_SPACE, String.valueOf(trimFlag)); StringBuilder buffer = new StringBuilder(); NodeList list = element.getChildNodes(); for (int i = 0; i list.getLength(); i++) @@ -568,7 +572,8 @@ public class XMLConfiguration extends Ba MapString, String attrmap = constructHierarchy(childNode, child, elemRefs, trimFlag); node.addChild(childNode); -handleDelimiters(node, childNode, trimFlag, attrmap); +Boolean childTrim =