svn commit: r1500821 - /commons/proper/chain/trunk/test-utils/
Author: simonetripodi Date: Mon Jul 8 16:25:15 2013 New Revision: 1500821 URL: http://svn.apache.org/r1500821 Log: updated ignore list Modified: commons/proper/chain/trunk/test-utils/ (props changed) Propchange: commons/proper/chain/trunk/test-utils/ -- --- svn:ignore (added) +++ svn:ignore Mon Jul 8 16:25:15 2013 @@ -0,0 +1,2 @@ +target +.settings
svn commit: r1500836 - /commons/proper/chain/trunk/pom.xml
Author: simonetripodi Date: Mon Jul 8 16:53:54 2013 New Revision: 1500836 URL: http://svn.apache.org/r1500836 Log: [CHAIN-106] JavaDoc report contains JavaDocs of cookbook examples initial attempt of excluding undesired apidocs be published Modified: commons/proper/chain/trunk/pom.xml Modified: commons/proper/chain/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/pom.xml?rev=1500836r1=1500835r2=1500836view=diff == --- commons/proper/chain/trunk/pom.xml (original) +++ commons/proper/chain/trunk/pom.xml Mon Jul 8 16:53:54 2013 @@ -227,6 +227,7 @@ artifactIdmaven-javadoc-plugin/artifactId configuration aggregatetrue/aggregate + excludePackageNamesorg.apache.commons.chain2.cookbook:org.apache.commons.chain2.apps/excludePackageNames /configuration /plugin
svn commit: r1486948 [5/5] - in /commons/sandbox/graph/branches/modularization: ./ api/ api/src/ api/src/main/ api/src/main/java/ api/src/main/java/org/ api/src/main/java/org/apache/ api/src/main/java
Modified: commons/sandbox/graph/branches/modularization/visit/src/test/java/org/apache/commons/graph/visit/NodeSequenceVisitor.java URL: http://svn.apache.org/viewvc/commons/sandbox/graph/branches/modularization/visit/src/test/java/org/apache/commons/graph/visit/NodeSequenceVisitor.java?rev=1486948r1=1486620r2=1486948view=diff == --- commons/sandbox/graph/branches/modularization/visit/src/test/java/org/apache/commons/graph/visit/NodeSequenceVisitor.java (original) +++ commons/sandbox/graph/branches/modularization/visit/src/test/java/org/apache/commons/graph/visit/NodeSequenceVisitor.java Tue May 28 15:00:27 2013 @@ -24,9 +24,9 @@ import static java.util.Collections.unmo import java.util.ArrayList; import java.util.List; -import org.apache.commons.graph.model.BaseLabeledEdge; -import org.apache.commons.graph.model.BaseLabeledVertex; import org.apache.commons.graph.model.UndirectedMutableGraph; +import org.apache.commons.graph.model.labeled.BaseLabeledEdge; +import org.apache.commons.graph.model.labeled.BaseLabeledVertex; public final class NodeSequenceVisitor extends BaseGraphVisitHandlerBaseLabeledVertex, BaseLabeledEdge, UndirectedMutableGraphBaseLabeledVertex, BaseLabeledEdge, ListBaseLabeledVertex Modified: commons/sandbox/graph/branches/modularization/visit/src/test/java/org/apache/commons/graph/visit/VisitTestCase.java URL: http://svn.apache.org/viewvc/commons/sandbox/graph/branches/modularization/visit/src/test/java/org/apache/commons/graph/visit/VisitTestCase.java?rev=1486948r1=1486620r2=1486948view=diff == --- commons/sandbox/graph/branches/modularization/visit/src/test/java/org/apache/commons/graph/visit/VisitTestCase.java (original) +++ commons/sandbox/graph/branches/modularization/visit/src/test/java/org/apache/commons/graph/visit/VisitTestCase.java Tue May 28 15:00:27 2013 @@ -19,8 +19,8 @@ package org.apache.commons.graph.visit; * under the License. */ -import static org.apache.commons.graph.CommonsGraph.newUndirectedMutableGraph; -import static org.apache.commons.graph.CommonsGraph.visit; +import static org.apache.commons.graph.model.GraphUtils.newUndirectedMutableGraph; +import static org.apache.commons.graph.visit.GraphVisitor.visit; import static org.junit.Assert.assertEquals; import java.util.ArrayList; @@ -28,9 +28,9 @@ import java.util.List; import org.apache.commons.graph.Graph; import org.apache.commons.graph.builder.AbstractGraphConnection; -import org.apache.commons.graph.model.BaseLabeledEdge; -import org.apache.commons.graph.model.BaseLabeledVertex; import org.apache.commons.graph.model.UndirectedMutableGraph; +import org.apache.commons.graph.model.labeled.BaseLabeledEdge; +import org.apache.commons.graph.model.labeled.BaseLabeledVertex; import org.junit.Test; public final class VisitTestCase
svn commit: r1486526 - /commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/xml/XmlConfigParser.java
Author: simonetripodi Date: Mon May 27 07:22:45 2013 New Revision: 1486526 URL: http://svn.apache.org/r1486526 Log: CHAIN-72 - configuration façade APIs XmlConfigParser must implement the ConfigParser interface Modified: commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/xml/XmlConfigParser.java Modified: commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/xml/XmlConfigParser.java URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/xml/XmlConfigParser.java?rev=1486526r1=1486525r2=1486526view=diff == --- commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/xml/XmlConfigParser.java (original) +++ commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/xml/XmlConfigParser.java Mon May 27 07:22:45 2013 @@ -17,6 +17,7 @@ package org.apache.commons.chain2.config.xml; import org.apache.commons.chain2.config.ChainConfigurationException; +import org.apache.commons.chain2.config.ConfigParser; import org.apache.commons.digester3.Digester; import org.apache.commons.digester3.RuleSet; @@ -33,7 +34,7 @@ import java.net.URL; * * @version $Id: ConfigParser.java 1364104 2012-07-21 14:25:54Z elijah $ */ -public class XmlConfigParser { +public class XmlConfigParser implements ConfigParser { // - Instance Variables /**
svn commit: r1486528 - /commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/CatalogFactory.java
Author: simonetripodi Date: Mon May 27 07:38:38 2013 New Revision: 1486528 URL: http://svn.apache.org/r1486528 Log: if the ConfigParser is not available in the classpath, then the application is in an illegal status Modified: commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/CatalogFactory.java Modified: commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/CatalogFactory.java URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/CatalogFactory.java?rev=1486528r1=1486527r2=1486528view=diff == --- commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/CatalogFactory.java (original) +++ commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/CatalogFactory.java Mon May 27 07:38:38 2013 @@ -226,8 +226,8 @@ public abstract class CatalogFactoryK, /** * Check to see if we have an implementation of a valid configuration - * parsing class loaded at runtime. If not, we throw a - * ChainConfigurationException. + * parsing class loaded at runtime. If not, we throw an + * IllegalStateException. */ public static void checkForValidConfigurationModule() { try { @@ -237,7 +237,7 @@ public abstract class CatalogFactoryK, String msg = Couldn't not find a configuration implementation. + Load a chain configuration module such as xml-configuration + into the classpath and try again.; -throw new RuntimeException(msg, e); +throw new IllegalStateException(msg, e); } } }
svn commit: r1486530 - /commons/sandbox/graph/branches/modularization/
Author: simonetripodi Date: Mon May 27 07:48:58 2013 New Revision: 1486530 URL: http://svn.apache.org/r1486530 Log: created the modularization branch to split the big monolith in small modules Added: commons/sandbox/graph/branches/modularization/ (props changed) - copied from r1486529, commons/sandbox/graph/trunk/ Propchange: commons/sandbox/graph/branches/modularization/ -- --- svn:ignore (added) +++ svn:ignore Mon May 27 07:48:58 2013 @@ -0,0 +1,15 @@ +target +test-reports +*~ +velocity.log* +.classpath +.project +maven.log +InvertedEdgeAdapter.patch +maven-eclipse.xml +.externalToolBuilders +.settings + +commons-graph.iml +.idea +bin Propchange: commons/sandbox/graph/branches/modularization/ -- svn:mergeinfo = /commons/sandbox/graph/trunk:1298136 Propchange: commons/sandbox/graph/branches/modularization/ -- svnmerge-integrated = /commons/sandbox/graph/trunk:1-1297889
svn commit: r1486478 - in /commons/proper/chain/trunk: api/ apps/cookbook-examples/ apps/example1/ apps/example2/ configuration/api/src/main/java/org/apache/commons/chain2/config/ configuration/xml/ c
Author: simonetripodi Date: Sun May 26 21:21:21 2013 New Revision: 1486478 URL: http://svn.apache.org/r1486478 Log: CHAIN-72 - configuration façade APIs still better separation between configuration APIs and XML implementation configuration exception moved to configuration package XML related classes moved in proper config.xml subpackage configuration exception moved to the configuration package/module registry throws a runtime exception rather than a configuration exception trivial: updated ignore list Added: commons/proper/chain/trunk/configuration/api/src/main/java/org/apache/commons/chain2/config/ChainConfigurationException.java - copied, changed from r1457658, commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/ChainConfigurationException.java commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/xml/ commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/xml/ConfigCatalogRule.java - copied, changed from r1486474, commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/ConfigCatalogRule.java commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/xml/ConfigDefineRule.java - copied, changed from r1486474, commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/ConfigDefineRule.java commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/xml/ConfigRegisterRule.java - copied, changed from r1486474, commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/ConfigRegisterRule.java commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/xml/ConfigRuleSet.java - copied, changed from r1486474, commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/ConfigRuleSet.java commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/xml/XmlConfigParser.java - copied, changed from r1486474, commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/ConfigParser.java commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/xml/package-info.java - copied, changed from r1486474, commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/package-info.java commons/proper/chain/trunk/configuration/xml/src/test/java/org/apache/commons/chain2/config/xml/ commons/proper/chain/trunk/configuration/xml/src/test/java/org/apache/commons/chain2/config/xml/ConfigParser2TestCase.java - copied, changed from r1457658, commons/proper/chain/trunk/configuration/xml/src/test/java/org/apache/commons/chain2/config/ConfigParser2TestCase.java commons/proper/chain/trunk/configuration/xml/src/test/java/org/apache/commons/chain2/config/xml/ConfigParserTestCase.java - copied, changed from r1457658, commons/proper/chain/trunk/configuration/xml/src/test/java/org/apache/commons/chain2/config/ConfigParserTestCase.java commons/proper/chain/trunk/configuration/xml/src/test/java/org/apache/commons/chain2/config/xml/TestChain.java - copied, changed from r1457658, commons/proper/chain/trunk/configuration/xml/src/test/java/org/apache/commons/chain2/config/TestChain.java commons/proper/chain/trunk/configuration/xml/src/test/java/org/apache/commons/chain2/config/xml/TestCommand.java - copied, changed from r1457658, commons/proper/chain/trunk/configuration/xml/src/test/java/org/apache/commons/chain2/config/TestCommand.java commons/proper/chain/trunk/configuration/xml/src/test/resources/org/apache/commons/chain2/config/xml/ commons/proper/chain/trunk/configuration/xml/src/test/resources/org/apache/commons/chain2/config/xml/test-config-2.xml - copied, changed from r1457658, commons/proper/chain/trunk/configuration/xml/src/test/resources/org/apache/commons/chain2/config/test-config-2.xml commons/proper/chain/trunk/configuration/xml/src/test/resources/org/apache/commons/chain2/config/xml/test-config.xml - copied, changed from r1457658, commons/proper/chain/trunk/configuration/xml/src/test/resources/org/apache/commons/chain2/config/test-config.xml Removed: commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/ConfigCatalogRule.java commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/ConfigDefineRule.java commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/ConfigParser.java commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config/ConfigRegisterRule.java commons/proper/chain/trunk/configuration/xml/src/main/java/org/apache/commons/chain2/config
svn commit: r1484153 - in /commons/sandbox/graph/trunk: ./ src/benchmarks/java/org/apache/commons/graph/shortestpath/ src/main/java/org/apache/commons/graph/shortestpath/ src/test/java/org/apache/comm
Author: simonetripodi Date: Sat May 18 17:50:00 2013 New Revision: 1484153 URL: http://svn.apache.org/r1484153 Log: SANDBOX-457 - Adding an implementation of a bidirectional Dijkstra's algorithm applied patch provided by Rodion Efremov [rodion.efre...@cs.helsinki.fi] Added: commons/sandbox/graph/trunk/src/benchmarks/java/org/apache/commons/graph/shortestpath/ commons/sandbox/graph/trunk/src/benchmarks/java/org/apache/commons/graph/shortestpath/UniVsBiDijkstraBenchmarkTestCase.java (with props) commons/sandbox/graph/trunk/src/test/java/org/apache/commons/graph/shortestpath/BidirDijkstraTestCase.java (with props) Modified: commons/sandbox/graph/trunk/pom.xml commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/DefaultShortestPathAlgorithmSelector.java commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/PredecessorsList.java commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/ShortestPathAlgorithmSelector.java Modified: commons/sandbox/graph/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/pom.xml?rev=1484153r1=1484152r2=1484153view=diff == --- commons/sandbox/graph/trunk/pom.xml (original) +++ commons/sandbox/graph/trunk/pom.xml Sat May 18 17:50:00 2013 @@ -92,6 +92,10 @@ nameMatthew Pocock/name emailturingatemyhamster AT gmail DOT com/email /contributor +contributor + nameRodion Efremov/name + emailrodion dot efremov at cs dot helsinki dot fi/email +/contributor /contributors scm Added: commons/sandbox/graph/trunk/src/benchmarks/java/org/apache/commons/graph/shortestpath/UniVsBiDijkstraBenchmarkTestCase.java URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/benchmarks/java/org/apache/commons/graph/shortestpath/UniVsBiDijkstraBenchmarkTestCase.java?rev=1484153view=auto == --- commons/sandbox/graph/trunk/src/benchmarks/java/org/apache/commons/graph/shortestpath/UniVsBiDijkstraBenchmarkTestCase.java (added) +++ commons/sandbox/graph/trunk/src/benchmarks/java/org/apache/commons/graph/shortestpath/UniVsBiDijkstraBenchmarkTestCase.java Sat May 18 17:50:00 2013 @@ -0,0 +1,204 @@ +package org.apache.commons.graph.shortestpath; + +/* + * 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. + */ + +import static java.lang.String.format; +import static java.lang.String.valueOf; +import static org.apache.commons.graph.CommonsGraph.findShortestPath; +import static org.apache.commons.graph.CommonsGraph.newDirectedMutableGraph; +import static org.junit.Assert.assertTrue; + +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Random; + +import org.apache.commons.graph.builder.AbstractGraphConnection; +import org.apache.commons.graph.GraphException; +import org.apache.commons.graph.Mapper; +import org.apache.commons.graph.model.BaseLabeledVertex; +import org.apache.commons.graph.model.BaseLabeledWeightedEdge; +import org.apache.commons.graph.model.BaseWeightedEdge; +import org.apache.commons.graph.model.DirectedMutableGraph; +import org.apache.commons.graph.WeightedPath; +import org.apache.commons.graph.weight.OrderedMonoid; +import org.apache.commons.graph.weight.primitive.DoubleWeightBaseOperations; + +import org.junit.BeforeClass; +import org.junit.Rule; +import org.junit.Test; + +import com.carrotsearch.junitbenchmarks.BenchmarkOptions; +import com.carrotsearch.junitbenchmarks.BenchmarkRule; +import com.carrotsearch.junitbenchmarks.annotation.AxisRange; +import com.carrotsearch.junitbenchmarks.annotation.BenchmarkMethodChart; + +@AxisRange( min = 0, max = 2 ) +@BenchmarkMethodChart( filePrefix = dijkstras ) +@BenchmarkOptions( benchmarkRounds = 10, warmupRounds = 5 ) +public final class UniVsBiDijkstraBenchmarkTestCase +{ +private static final int NODES = 5000; +private static final int EDGES = 10; + +@Rule +public BenchmarkRule benchmarkRun = new BenchmarkRule(); + +private static DirectedMutableGraphBaseLabeledVertex
svn commit: r1461601 - in /commons/proper/chain/trunk/core/src: main/java/org/apache/commons/chain2/impl/CatalogBase.java test/java/org/apache/commons/chain2/impl/CatalogBaseTestCase.java
Author: simonetripodi Date: Wed Mar 27 14:23:12 2013 New Revision: 1461601 URL: http://svn.apache.org/r1461601 Log: [CHAIN-80] NPE when submitting null commands map to CatalogBase - patch submitted by Steve Westwood Modified: commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/CatalogBase.java commons/proper/chain/trunk/core/src/test/java/org/apache/commons/chain2/impl/CatalogBaseTestCase.java Modified: commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/CatalogBase.java URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/CatalogBase.java?rev=1461601r1=1461600r2=1461601view=diff == --- commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/CatalogBase.java (original) +++ commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/CatalogBase.java Wed Mar 27 14:23:12 2013 @@ -58,10 +58,16 @@ public class CatalogBaseK, V, C extends * All Map keys should be codeString/code and all values should be codeCommand/code./p * * @param commands Map of Commands. + * + * @exception IllegalArgumentException if codecommands/code + * is codenull/code * * @since Chain 1.1 */ -public CatalogBase(MapString, CommandK, V, C commands ) { +public CatalogBase(MapString, CommandK, V, C commands) { +if (commands == null) { +throw new IllegalArgumentException('commands' parameter must be not null); +} this.commands.putAll( commands ); } Modified: commons/proper/chain/trunk/core/src/test/java/org/apache/commons/chain2/impl/CatalogBaseTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/core/src/test/java/org/apache/commons/chain2/impl/CatalogBaseTestCase.java?rev=1461601r1=1461600r2=1461601view=diff == --- commons/proper/chain/trunk/core/src/test/java/org/apache/commons/chain2/impl/CatalogBaseTestCase.java (original) +++ commons/proper/chain/trunk/core/src/test/java/org/apache/commons/chain2/impl/CatalogBaseTestCase.java Wed Mar 27 14:23:12 2013 @@ -19,9 +19,10 @@ package org.apache.commons.chain2.impl; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; import java.util.Iterator; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; import org.apache.commons.chain2.Catalog; import org.apache.commons.chain2.Command; @@ -145,7 +146,31 @@ public class CatalogBaseTestCase { assertNull(catalog.getCommand(ChainBase)); } - +// Test construction with commands collection +@Test +public void testInstantiationWithMapOfCommands() { +@SuppressWarnings(serial) +MapString, CommandString, Object, ContextString, Object +commands = new ConcurrentHashMapString, CommandString, Object, ContextString, Object() { +{ +put(AddingCommand, new AddingCommand(, null)); +} +}; + +CatalogBaseString, Object, ContextString, Object +catalog = new CatalogBaseString, Object, ContextString, Object(commands); + +assertEquals(Correct command count, 1, catalog.getCommands().size()); +} + +// Examine construction with null commands collection +@Test(expected = IllegalArgumentException.class) +public void testInstantiationWithNullMapOfCommands() { +MapString, CommandString, Object, ContextString, Object commands = null; +@SuppressWarnings(unused) +CatalogBaseString, Object, ContextString, Object +catalog = new CatalogBaseString, Object, ContextString, Object(commands); +} // Support Methods
svn commit: r1461611 - /commons/proper/ognl/trunk/pom.xml
Author: simonetripodi Date: Wed Mar 27 14:39:12 2013 New Revision: 1461611 URL: http://svn.apache.org/r1461611 Log: trivial: changing email address pattern makes the site-plugin able to retrieve the associated gravatar and creates an enhanced team-list page Modified: commons/proper/ognl/trunk/pom.xml Modified: commons/proper/ognl/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/pom.xml?rev=1461611r1=1461610r2=1461611view=diff == --- commons/proper/ognl/trunk/pom.xml (original) +++ commons/proper/ognl/trunk/pom.xml Wed Mar 27 14:39:12 2013 @@ -51,7 +51,7 @@ limitations under the License. developer nameAntonio Petrelli/name idapetrelli/id - emailapetrelli at apache dot org/email + emailapetre...@apache.org/email roles roleCommitter/role roleEmeritus/role @@ -60,7 +60,7 @@ limitations under the License. developer nameChristian Grobmeier/name idgrobmeier/id - emailgrobmeier at apache dot org/email + emailgrobme...@apache.org/email roles rolePMC Member/role roleCommitter/role @@ -69,7 +69,7 @@ limitations under the License. developer nameJesse Kuhnert/name idjkuhnert/id - emailjkuhnert at apache dot org/email + emailjkuhn...@apache.org/email roles roleCommitter/role /roles @@ -77,7 +77,7 @@ limitations under the License. developer nameJochen Wiedmann/name idjochen/id - emailjochen at apache dot org/email + emailjoc...@apache.org/email roles rolePMC Member/role roleCommitter/role @@ -86,7 +86,7 @@ limitations under the License. developer nameLukasz Lenart/name idlukaszlenart/id - emaillukaszlenart at apache dot org/email + emaillukaszlen...@apache.org/email roles roleCommitter/role /roles @@ -94,7 +94,7 @@ limitations under the License. developer nameOlivier Lamy/name idolamy/id - emailolamy at apache dot org/email + emailol...@apache.org/email roles roleCommitter/role /roles @@ -102,7 +102,7 @@ limitations under the License. developer nameLuke Blanshard/name idleadpipe/id - emailleadpipe at apache dot org/email + emailleadp...@apache.org/email roles roleCommitter/role /roles @@ -110,7 +110,7 @@ limitations under the License. developer nameMarc Andrew Davidson/name idjavadrewd/id - emailjavadrewd at apache dot org/email + emailjavadr...@apache.org/email roles roleCommitter/role /roles @@ -118,7 +118,7 @@ limitations under the License. developer nameMaurizio Cucchiara/name idmcucchiara/id - emailmcucchiara at apache dot org/email + emailmcucchi...@apache.org/email roles roleCommitter/role /roles @@ -126,7 +126,7 @@ limitations under the License. developer nameSimone Tripodi/name idsimonetripodi/id - emailsimonetripodi at apache dot org/email + emailsimonetrip...@apache.org/email roles rolePMC Member/role roleCommitter/role @@ -135,7 +135,7 @@ limitations under the License. developer nameUpayavira/name idupayavira/id - emailupayavira at apache dot org/email + emailupayav...@apache.org/email roles roleCommitter/role /roles @@ -148,7 +148,7 @@ limitations under the License. /contributor contributor nameAdrian Cumiskey/name - emailacumiskey at apache dot org/email + emailacumis...@apache.org/email /contributor /contributors
svn commit: r1461620 - in /commons/proper/ognl/trunk/src/main/assembly: bin.xml src.xml
Author: simonetripodi Date: Wed Mar 27 14:49:50 2013 New Revision: 1461620 URL: http://svn.apache.org/r1461620 Log: trivial: 2 spaces indentation for XML documents Modified: commons/proper/ognl/trunk/src/main/assembly/bin.xml commons/proper/ognl/trunk/src/main/assembly/src.xml Modified: commons/proper/ognl/trunk/src/main/assembly/bin.xml URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/assembly/bin.xml?rev=1461620r1=1461619r2=1461620view=diff == --- commons/proper/ognl/trunk/src/main/assembly/bin.xml (original) +++ commons/proper/ognl/trunk/src/main/assembly/bin.xml Wed Mar 27 14:49:50 2013 @@ -7,7 +7,7 @@ (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 +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, @@ -16,32 +16,32 @@ limitations under the License. -- assembly xmlns=http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1; -xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; - xsi:schemaLocation=http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd; -idbin/id -formats -formattar.gz/format -formatzip/format -/formats -includeSiteDirectoryfalse/includeSiteDirectory -fileSets -fileSet -includes -includeLICENSE.txt/include -includeNOTICE.txt/include -includeRELEASE-NOTES.txt/include -/includes -/fileSet -fileSet -directorytarget/directory -outputDirectory/outputDirectory -includes -include*.jar/include -/includes -/fileSet -fileSet -directorytarget/site/apidocs/directory -outputDirectoryapidocs/outputDirectory -/fileSet -/fileSets +xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation=http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd; + idbin/id + formats +formattar.gz/format +formatzip/format + /formats + includeSiteDirectoryfalse/includeSiteDirectory + fileSets +fileSet + includes +includeLICENSE.txt/include +includeNOTICE.txt/include +includeRELEASE-NOTES.txt/include + /includes +/fileSet +fileSet + directorytarget/directory + outputDirectory/outputDirectory + includes +include*.jar/include + /includes +/fileSet +fileSet + directorytarget/site/apidocs/directory + outputDirectoryapidocs/outputDirectory +/fileSet + /fileSets /assembly Modified: commons/proper/ognl/trunk/src/main/assembly/src.xml URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/assembly/src.xml?rev=1461620r1=1461619r2=1461620view=diff == --- commons/proper/ognl/trunk/src/main/assembly/src.xml (original) +++ commons/proper/ognl/trunk/src/main/assembly/src.xml Wed Mar 27 14:49:50 2013 @@ -7,7 +7,7 @@ (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 +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, @@ -16,27 +16,27 @@ limitations under the License. -- assembly xmlns=http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1; -xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; - xsi:schemaLocation=http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd; -idsrc/id -formats -formattar.gz/format -formatzip/format -/formats - baseDirectory${project.artifactId}-${commons.release.version}-src/baseDirectory -fileSets -fileSet -includes -includecheckstyle.xml/include -includeLICENSE.txt/include -includeNOTICE.txt/include -includepom.xml/include -includeRELEASE-NOTES.txt/include -includefindbugs-exclude-filter.xml/include -/includes -/fileSet -fileSet -directorysrc/directory -/fileSet -/fileSets +xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; + xsi:schemaLocation=http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.1 http://maven.apache.org/xsd/assembly-1.1.1.xsd
svn commit: r1461622 - in /commons/proper/ognl/trunk/src/main/assembly: bin.xml src.xml
Author: simonetripodi Date: Wed Mar 27 14:51:45 2013 New Revision: 1461622 URL: http://svn.apache.org/r1461622 Log: reuse already defined properties rather than composing them to create the baseDirectory Modified: commons/proper/ognl/trunk/src/main/assembly/bin.xml commons/proper/ognl/trunk/src/main/assembly/src.xml Modified: commons/proper/ognl/trunk/src/main/assembly/bin.xml URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/assembly/bin.xml?rev=1461622r1=1461621r2=1461622view=diff == --- commons/proper/ognl/trunk/src/main/assembly/bin.xml (original) +++ commons/proper/ognl/trunk/src/main/assembly/bin.xml Wed Mar 27 14:51:45 2013 @@ -23,6 +23,7 @@ formattar.gz/format formatzip/format /formats + baseDirectory${project.build.finalName}-bin/baseDirectory includeSiteDirectoryfalse/includeSiteDirectory fileSets fileSet Modified: commons/proper/ognl/trunk/src/main/assembly/src.xml URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/assembly/src.xml?rev=1461622r1=1461621r2=1461622view=diff == --- commons/proper/ognl/trunk/src/main/assembly/src.xml (original) +++ commons/proper/ognl/trunk/src/main/assembly/src.xml Wed Mar 27 14:51:45 2013 @@ -23,7 +23,7 @@ formattar.gz/format formatzip/format /formats - baseDirectory${project.artifactId}-${commons.release.version}-src/baseDirectory + baseDirectory${project.build.finalName}-src/baseDirectory fileSets fileSet includes
svn commit: r1461628 - /commons/proper/ognl/trunk/src/main/assembly/src.xml
Author: simonetripodi Date: Wed Mar 27 14:58:15 2013 New Revision: 1461628 URL: http://svn.apache.org/r1461628 Log: use the `exclude` logic to create the sources archive, rather than specifying what has to be included Modified: commons/proper/ognl/trunk/src/main/assembly/src.xml Modified: commons/proper/ognl/trunk/src/main/assembly/src.xml URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/assembly/src.xml?rev=1461628r1=1461627r2=1461628view=diff == --- commons/proper/ognl/trunk/src/main/assembly/src.xml (original) +++ commons/proper/ognl/trunk/src/main/assembly/src.xml Wed Mar 27 14:58:15 2013 @@ -26,17 +26,17 @@ baseDirectory${project.build.finalName}-src/baseDirectory fileSets fileSet - includes -includecheckstyle.xml/include -includeLICENSE.txt/include -includeNOTICE.txt/include -includepom.xml/include -includeRELEASE-NOTES.txt/include -includefindbugs-exclude-filter.xml/include - /includes -/fileSet -fileSet - directorysrc/directory + directory${basedir}/directory + excludes +exclude**/.classpath/exclude +exclude**/.project/exclude +exclude**/.settings//exclude +exclude**/doap_*.rdf/exclude +exclude**/bin//exclude +exclude**/.externalToolBuilders//exclude +exclude**/${project.build.directory}//exclude +exclude**/download*.cgi/exclude + /excludes /fileSet /fileSets /assembly
svn commit: r1461629 - /commons/proper/ognl/trunk/src/main/assembly/bin.xml
Author: simonetripodi Date: Wed Mar 27 14:59:57 2013 New Revision: 1461629 URL: http://svn.apache.org/r1461629 Log: ${project.build.directory} could be overridden in the POM and forget to be updated in the assembly descriptor Modified: commons/proper/ognl/trunk/src/main/assembly/bin.xml Modified: commons/proper/ognl/trunk/src/main/assembly/bin.xml URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/main/assembly/bin.xml?rev=1461629r1=1461628r2=1461629view=diff == --- commons/proper/ognl/trunk/src/main/assembly/bin.xml (original) +++ commons/proper/ognl/trunk/src/main/assembly/bin.xml Wed Mar 27 14:59:57 2013 @@ -34,14 +34,14 @@ /includes /fileSet fileSet - directorytarget/directory + directory${project.build.directory}/directory outputDirectory/outputDirectory includes include*.jar/include /includes /fileSet fileSet - directorytarget/site/apidocs/directory + directory${project.build.directory}/site/apidocs/directory outputDirectoryapidocs/outputDirectory /fileSet /fileSets
svn commit: r1461633 - /commons/proper/ognl/trunk/doap_ognl.rdf
Author: simonetripodi Date: Wed Mar 27 15:07:47 2013 New Revision: 1461633 URL: http://svn.apache.org/r1461633 Log: initial checkin of missing DOAP descripto for OGNL component Added: commons/proper/ognl/trunk/doap_ognl.rdf (with props) Added: commons/proper/ognl/trunk/doap_ognl.rdf URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/doap_ognl.rdf?rev=1461633view=auto == --- commons/proper/ognl/trunk/doap_ognl.rdf (added) +++ commons/proper/ognl/trunk/doap_ognl.rdf Wed Mar 27 15:07:47 2013 @@ -0,0 +1,48 @@ +?xml version=1.0? +!-- + 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. +-- +rdf:RDF xmlns=http://usefulinc.com/ns/doap#; xmlns:rdf=http://www.w3.org/1999/02/22-rdf-syntax-ns#; xmlns:asfext=http://projects.apache.org/ns/asfext#; xmlns:rdfs=http://www.w3.org/2000/01/rdf-schema#; xmlns:doap=http://usefulinc.com/ns/doap#; xml:lang=en + Project rdf:about=http://commons.apache.org/fileupload/; +nameApache Commons FileUpload/name +homepage rdf:resource=http://commons.apache.org/proper/commons-ognl// +programming-languageJava/programming-language +category rdf:resource=http://projects.apache.org/category/library/ +license rdf:resource=http://usefulinc.com/doap/licenses/asl20/ +bug-database rdf:resource=http://issues.apache.org/jira/browse/OGNL/ +download-page rdf:resource=http://commons.apache.org/proper/commons-ognl/download_ognl.cgi/ +asfext:pmc rdf:resource=http://commons.apache.org// +shortdesc xml:lang=enObject Graph Navigation Library/shortdesc +description xml:lang=en +The Apache Commons OGNL library is a Java development framework for Object-Graph Navigation Language, +plus other extras such as list projection and selection and lambda expressions. + /description +repository + SVNRepository +browse rdf:resource=http://svn.apache.org/repos/asf/ +location rdf:resource=http://svn.apache.org/repos/asf/commons/proper/ognl/ + /SVNRepository +/repository +release + Version +namecommons-ognl/name +created2013-??-??/created +revision4.0/revision + /Version +/release +mailing-list rdf:resource=http://commons.apache.org/mail-lists.html/ + /Project +/rdf:RDF Propchange: commons/proper/ognl/trunk/doap_ognl.rdf -- svn:eol-style = native Propchange: commons/proper/ognl/trunk/doap_ognl.rdf -- svn:keywords = Date Revision Author HeadURL Id
svn commit: r1461635 - /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/TestOgnlRuntime.java
Author: simonetripodi Date: Wed Mar 27 15:16:44 2013 New Revision: 1461635 URL: http://svn.apache.org/r1461635 Log: trivial: suppressed rawtype warning by specifying generics, muted unused warning (the object method is just a test method) Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/TestOgnlRuntime.java Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/TestOgnlRuntime.java URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/TestOgnlRuntime.java?rev=1461635r1=1461634r2=1461635view=diff == --- commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/TestOgnlRuntime.java (original) +++ commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/TestOgnlRuntime.java Wed Mar 27 15:16:44 2013 @@ -75,7 +75,7 @@ public class TestOgnlRuntime public void test_Get_Private_Class() throws Exception { -List list = Arrays.asList( hello, world ); +ListString list = Arrays.asList( hello, world ); Method m = OgnlRuntime.getReadMethod( list.getClass(), iterator ); assertNotNull( m ); @@ -275,7 +275,7 @@ public class TestOgnlRuntime Method method = OgnlRuntime.getSetMethod( context, GenericCracker.class, param ); assertNotNull( method ); -Class[] types = method.getParameterTypes(); +Class?[] types = method.getParameterTypes(); assertEquals( 1, types.length ); assertEquals( Integer.class, types[0] ); } @@ -301,7 +301,7 @@ public class TestOgnlRuntime Method method = OgnlRuntime.getSetMethod( context, GameGeneric.class, ids ); assertNotNull( method ); -Class[] types = OgnlRuntime.findParameterTypes( GameGeneric.class, method ); +Class?[] types = OgnlRuntime.findParameterTypes( GameGeneric.class, method ); assertEquals( 1, types.length ); assertEquals( Long[].class, types[0] ); } @@ -315,7 +315,7 @@ public class TestOgnlRuntime Method method = OgnlRuntime.getSetMethod( context, BaseGeneric.class, ids ); assertNotNull( method ); -Class[] types = OgnlRuntime.findParameterTypes( BaseGeneric.class, method ); +Class?[] types = OgnlRuntime.findParameterTypes( BaseGeneric.class, method ); assertEquals( 1, types.length ); assertEquals( Serializable[].class, types[0] ); } @@ -324,7 +324,7 @@ public class TestOgnlRuntime public void test_Get_Declared_Methods_With_Synthetic_Methods() throws Exception { -List result = OgnlRuntime.getDeclaredMethods( SubclassSyntheticObject.class, list, false ); +ListMethod result = OgnlRuntime.getDeclaredMethods( SubclassSyntheticObject.class, list, false ); // synthetic method would be // public volatile java.util.List org.ognl.test.objects.SubclassSyntheticObject.getList(), @@ -345,6 +345,7 @@ public class TestOgnlRuntime private static class GenericParentT { +@SuppressWarnings( unused ) public void save( T entity ) { @@ -373,11 +374,11 @@ public class TestOgnlRuntime Method saveMethod = GenericParent.class.getMethod( save, Object.class ); System.out.println( saveMethod ); -Class[] longClass = OgnlRuntime.findParameterTypes( LongChild.class, saveMethod ); +Class?[] longClass = OgnlRuntime.findParameterTypes( LongChild.class, saveMethod ); assertNotSame( longClass[0], String.class ); assertSame( longClass[0], Long.class ); -Class[] stringClass = OgnlRuntime.findParameterTypes( StringChild.class, saveMethod ); +Class?[] stringClass = OgnlRuntime.findParameterTypes( StringChild.class, saveMethod ); assertNotSame( The cached parameter types from previous calls are used, stringClass[0], Long.class ); assertSame( stringClass[0], String.class ); }
svn commit: r1461640 - /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SetterTest.java
Author: simonetripodi Date: Wed Mar 27 15:21:01 2013 New Revision: 1461640 URL: http://svn.apache.org/r1461640 Log: trivial: suppressed rawtype warning by specifying generics Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SetterTest.java Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SetterTest.java URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SetterTest.java?rev=1461640r1=1461639r2=1461640view=diff == --- commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SetterTest.java (original) +++ commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/SetterTest.java Wed Mar 27 15:21:01 2013 @@ -34,7 +34,7 @@ public class SetterTest { private static Root ROOT = new Root(); -static Set _list = new HashSet(); +static SetString _list = new HashSetString(); static { _list.add( Test1 ); @@ -54,7 +54,7 @@ public class SetterTest { ROOT, settableList[|], bar, oompa }, { ROOT, settableList[|], oompa }, { ROOT, map.newValue, new Integer( 101 ), new Integer( 555 ) }, -{ ROOT, map, ROOT.getMap(), new HashMap(), NoSuchPropertyException.class }, +{ ROOT, map, ROOT.getMap(), new HashMapString, String(), NoSuchPropertyException.class }, { ROOT.getMap(), newValue2 || put(\newValue2\,987), newValue2, new Integer( 987 ), new Integer( 1002 ) }, { ROOT, map.(someMissingKey || newValue), new Integer( 555 ), new Integer( 666 ) }, { ROOT.getMap(), newValue || someMissingKey, new Integer( 666 ), new Integer( 666 ) }, // no setting happens!
svn commit: r1461647 - /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/PropertySetterTest.java
Author: simonetripodi Date: Wed Mar 27 15:24:49 2013 New Revision: 1461647 URL: http://svn.apache.org/r1461647 Log: suppressed rawtype warning by specifying generics Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/PropertySetterTest.java Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/PropertySetterTest.java URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/PropertySetterTest.java?rev=1461647r1=1461646r2=1461647view=diff == --- commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/PropertySetterTest.java (original) +++ commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/PropertySetterTest.java Wed Mar 27 15:24:49 2013 @@ -33,7 +33,7 @@ public class PropertySetterTest extends TestCase { -private Map map; +private MapString, String map; private TestObject testObject = new TestObject( propertyValue ); @@ -73,7 +73,7 @@ public class PropertySetterTest } } -public Map getMap() +public MapString, String getMap() { return map; }
svn commit: r1461650 - /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/PropertyNotFoundTest.java
Author: simonetripodi Date: Wed Mar 27 15:26:33 2013 New Revision: 1461650 URL: http://svn.apache.org/r1461650 Log: suppressed rawtype warning by specifying generics Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/PropertyNotFoundTest.java Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/PropertyNotFoundTest.java URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/PropertyNotFoundTest.java?rev=1461650r1=1461649r2=1461650view=diff == --- commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/PropertyNotFoundTest.java (original) +++ commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/PropertyNotFoundTest.java Wed Mar 27 15:26:33 2013 @@ -75,12 +75,12 @@ public class PropertyNotFoundTest public static class BlahPropertyAccessor implements PropertyAccessor { -public void setProperty( Map context, Object target, Object name, Object value ) +public void setProperty( MapString, Object context, Object target, Object name, Object value ) throws OgnlException { } -public Object getProperty( Map context, Object target, Object name ) +public Object getProperty( MapString, Object context, Object target, Object name ) throws OgnlException { if ( x.equals( name ) || y.equals( name ) )
svn commit: r1461651 - /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/Bean3.java
Author: simonetripodi Date: Wed Mar 27 15:28:32 2013 New Revision: 1461651 URL: http://svn.apache.org/r1461651 Log: suppressed rawtype warning by specifying generics Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/Bean3.java Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/Bean3.java URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/Bean3.java?rev=1461651r1=1461650r2=1461651view=diff == --- commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/Bean3.java (original) +++ commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/objects/Bean3.java Wed Mar 27 15:28:32 2013 @@ -26,9 +26,9 @@ public class Bean3 { private int value = 100; -private Map map; +private MapString, String map; { -map = new HashMap(); +map = new HashMapString, String(); map.put( foo, bar ); map.put( bar, baz ); } @@ -57,7 +57,7 @@ public class Bean3 _indexValue = value; } -public Map getMap() +public MapString, String getMap() { return map; }
svn commit: r1461652 - /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java
Author: simonetripodi Date: Wed Mar 27 15:29:57 2013 New Revision: 1461652 URL: http://svn.apache.org/r1461652 Log: suppressed rawtype warning by specifying generics Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java?rev=1461652r1=1461651r2=1461652view=diff == --- commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java (original) +++ commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java Wed Mar 27 15:29:57 2013 @@ -203,7 +203,7 @@ public abstract class OgnlTestCase } if (testedResult instanceof Class) { -Assert.assertTrue(Exception.class.isAssignableFrom((Class) testedResult)); +Assert.assertTrue(Exception.class.isAssignableFrom((Class?) testedResult)); } else { throw ex; }
svn commit: r1461653 - /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java
Author: simonetripodi Date: Wed Mar 27 15:31:12 2013 New Revision: 1461653 URL: http://svn.apache.org/r1461653 Log: trivial: static import of assertTrue method Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java?rev=1461653r1=1461652r2=1461653view=diff == --- commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java (original) +++ commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java Wed Mar 27 15:31:12 2013 @@ -19,17 +19,18 @@ */ package org.apache.commons.ognl.test; -import junit.framework.Assert; +import static org.junit.Assert.assertTrue; + +import java.io.PrintWriter; +import java.io.StringWriter; +import java.lang.reflect.Array; + import org.apache.commons.ognl.Ognl; import org.apache.commons.ognl.OgnlContext; import org.apache.commons.ognl.SimpleNode; import org.junit.Before; import org.junit.Test; -import java.io.PrintWriter; -import java.io.StringWriter; -import java.lang.reflect.Array; - public abstract class OgnlTestCase { @@ -149,7 +150,7 @@ public abstract class OgnlTestCase public static void assertEquals(Object expected, Object actual) { if (expected != null expected.getClass().isArray() actual != null actual.getClass().isArray()) { -Assert.assertEquals(Array.getLength(expected), Array.getLength(actual)); +assertEquals(Array.getLength(expected), Array.getLength(actual)); int length = Array.getLength(expected); @@ -158,17 +159,17 @@ public abstract class OgnlTestCase Object aactual = Array.get(actual, i); if (aexpected != null aactual != null Boolean.class.isAssignableFrom(aexpected.getClass())) { -Assert.assertEquals(aexpected.toString(), aactual.toString()); +assertEquals(aexpected.toString(), aactual.toString()); } else OgnlTestCase.assertEquals(aexpected, aactual); } } else if (expected != null actual != null Character.class.isInstance(expected) Character.class.isInstance(actual)) { -Assert.assertEquals(((Character) expected).charValue(), ((Character) actual).charValue()); +assertEquals(((Character) expected).charValue(), ((Character) actual).charValue()); } else { -Assert.assertEquals(expected, actual); +assertEquals(expected, actual); } } @@ -203,7 +204,7 @@ public abstract class OgnlTestCase } if (testedResult instanceof Class) { -Assert.assertTrue(Exception.class.isAssignableFrom((Class?) testedResult)); +assertTrue(Exception.class.isAssignableFrom((Class?) testedResult)); } else { throw ex; }
svn commit: r1461656 - /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java
Author: simonetripodi Date: Wed Mar 27 15:33:21 2013 New Revision: 1461656 URL: http://svn.apache.org/r1461656 Log: trivial: code format, it was not respecting the standard Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java?rev=1461656r1=1461655r2=1461656view=diff == --- commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java (original) +++ commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java Wed Mar 27 15:33:21 2013 @@ -63,23 +63,33 @@ public abstract class OgnlTestCase * Returns true if object1 is equal to object2 in either the sense that they are the same object or, if both are * non-null if they are equal in the CODEequals()/CODE sense. */ -public static boolean isEqual(Object object1, Object object2) { +public static boolean isEqual( Object object1, Object object2 ) +{ boolean result = false; -if (object1 == object2) { +if ( object1 == object2 ) +{ result = true; -} else { -if ((object1 != null) object1.getClass().isArray()) { -if ((object2 != null) object2.getClass().isArray() (object2.getClass() == object1.getClass())) { -result = (Array.getLength(object1) == Array.getLength(object2)); -if (result) { -for (int i = 0, icount = Array.getLength(object1); result (i icount); i++) { -result = isEqual(Array.get(object1, i), Array.get(object2, i)); +} +else +{ +if ( ( object1 != null ) object1.getClass().isArray() ) +{ +if ( ( object2 != null ) object2.getClass().isArray() ( object2.getClass() == object1.getClass() ) ) +{ +result = ( Array.getLength( object1 ) == Array.getLength( object2 ) ); +if ( result ) +{ +for ( int i = 0, icount = Array.getLength( object1 ); result ( i icount ); i++ ) +{ +result = isEqual( Array.get( object1, i ), Array.get( object2, i ) ); } } } -} else { -result = (object1 != null) (object2 != null) object1.equals(object2); +} +else +{ +result = ( object1 != null ) ( object2 != null ) object1.equals( object2 ); } } return result; @@ -119,57 +129,72 @@ public abstract class OgnlTestCase * === Public methods * === */ -public String getExpressionDump(SimpleNode node) { +public String getExpressionDump( SimpleNode node ) +{ StringWriter writer = new StringWriter(); -node.dump(new PrintWriter(writer),); +node.dump( new PrintWriter( writer ), ); return writer.toString(); } -public String getExpressionString() { +public String getExpressionString() +{ return _expressionString; } public SimpleNode getExpression() -throws Exception { -if (_expression == null) { -_expression = (SimpleNode) Ognl.parseExpression(_expressionString); +throws Exception +{ +if ( _expression == null ) +{ +_expression = (SimpleNode) Ognl.parseExpression( _expressionString ); } -if (_compileExpressions) { -_expression = (SimpleNode) Ognl.compileExpression(_context, _root, _expressionString); +if ( _compileExpressions ) +{ +_expression = (SimpleNode) Ognl.compileExpression( _context, _root, _expressionString ); } return _expression; } -public Object getExpectedResult() { +public Object getExpectedResult() +{ return _expectedResult; } -public static void assertEquals(Object expected, Object actual) { -if (expected != null expected.getClass().isArray() actual != null actual.getClass().isArray()) { +public static void assertEquals( Object expected, Object actual ) +{ +if ( expected != null expected.getClass().isArray() actual != null actual.getClass().isArray() ) +{ -assertEquals(Array.getLength(expected), Array.getLength(actual)); +assertEquals( Array.getLength( expected ), Array.getLength( actual
svn commit: r1461658 - /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/NumericConversionTest.java
Author: simonetripodi Date: Wed Mar 27 15:39:07 2013 New Revision: 1461658 URL: http://svn.apache.org/r1461658 Log: fixed rawtypes warnings trivial code format Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/NumericConversionTest.java Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/NumericConversionTest.java URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/NumericConversionTest.java?rev=1461658r1=1461657r2=1461658view=diff == --- commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/NumericConversionTest.java (original) +++ commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/NumericConversionTest.java Wed Mar 27 15:39:07 2013 @@ -34,13 +34,14 @@ import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; -@RunWith(value = Parameterized.class) +@RunWith( value = Parameterized.class ) public class NumericConversionTest extends OgnlTestCase { + private static Object[][] TESTS = { -/* To Integer.class */ -{ 55, Integer.class, new Integer( 55 ) }, { new Integer( 55 ), Integer.class, new Integer( 55 ) }, +/* To Integer.class */ +{ 55, Integer.class, new Integer( 55 ) }, { new Integer( 55 ), Integer.class, new Integer( 55 ) }, { new Double( 55 ), Integer.class, new Integer( 55 ) }, { Boolean.TRUE, Integer.class, new Integer( 1 ) }, { new Byte( (byte) 55 ), Integer.class, new Integer( 55 ) }, { new Character( (char) 55 ), Integer.class, new Integer( 55 ) }, @@ -151,7 +152,7 @@ public class NumericConversionTest private Object value; -private Class toClass; +private Class? extends Number toClass; private Object expectedValue; @@ -182,7 +183,7 @@ public class NumericConversionTest * === Constructors * === */ -public NumericConversionTest( Object value, Class toClass, Object expectedValue, int scale ) +public NumericConversionTest( Object value, Class? extends Number toClass, Object expectedValue, int scale ) { super( value + [ + value.getClass().getName() + ] - + toClass.getName() + == + expectedValue + [ + expectedValue.getClass().getName() + ]
svn commit: r1461660 - /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java
Author: simonetripodi Date: Wed Mar 27 15:45:59 2013 New Revision: 1461660 URL: http://svn.apache.org/r1461660 Log: stack overflow error due to methods signature collisions Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java?rev=1461660r1=1461659r2=1461660view=diff == --- commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java (original) +++ commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java Wed Mar 27 15:45:59 2013 @@ -19,8 +19,6 @@ */ package org.apache.commons.ognl.test; -import static org.junit.Assert.assertTrue; - import java.io.PrintWriter; import java.io.StringWriter; import java.lang.reflect.Array; @@ -28,6 +26,7 @@ import java.lang.reflect.Array; import org.apache.commons.ognl.Ognl; import org.apache.commons.ognl.OgnlContext; import org.apache.commons.ognl.SimpleNode; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -168,7 +167,7 @@ public abstract class OgnlTestCase if ( expected != null expected.getClass().isArray() actual != null actual.getClass().isArray() ) { -assertEquals( Array.getLength( expected ), Array.getLength( actual ) ); +Assert.assertEquals( Array.getLength( expected ), Array.getLength( actual ) ); int length = Array.getLength( expected ); @@ -179,7 +178,7 @@ public abstract class OgnlTestCase if ( aexpected != null aactual != null Boolean.class.isAssignableFrom( aexpected.getClass() ) ) { -assertEquals( aexpected.toString(), aactual.toString() ); +Assert.assertEquals( aexpected.toString(), aactual.toString() ); } else OgnlTestCase.assertEquals( aexpected, aactual ); @@ -189,12 +188,12 @@ public abstract class OgnlTestCase Character.class.isInstance( actual ) ) { -assertEquals( ( (Character) expected ).charValue(), ( (Character) actual ).charValue() ); +Assert.assertEquals( ( (Character) expected ).charValue(), ( (Character) actual ).charValue() ); } else { -assertEquals( expected, actual ); +Assert.assertEquals( expected, actual ); } } @@ -236,7 +235,7 @@ public abstract class OgnlTestCase if ( testedResult instanceof Class ) { -assertTrue( Exception.class.isAssignableFrom( (Class?) testedResult ) ); +Assert.assertTrue( Exception.class.isAssignableFrom( (Class?) testedResult ) ); } else {
svn commit: r1461663 - in /commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/util: ContextClassLoader.java EnhancedClassLoader.java
Author: simonetripodi Date: Wed Mar 27 15:47:54 2013 New Revision: 1461663 URL: http://svn.apache.org/r1461663 Log: fixed rawtypes warnings Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/util/ContextClassLoader.java commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/util/EnhancedClassLoader.java Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/util/ContextClassLoader.java URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/util/ContextClassLoader.java?rev=1461663r1=1461662r2=1461663view=diff == --- commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/util/ContextClassLoader.java (original) +++ commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/util/ContextClassLoader.java Wed Mar 27 15:47:54 2013 @@ -40,7 +40,7 @@ public class ContextClassLoader * === Overridden methods * === */ -protected Class findClass( String name ) +protected Class? findClass( String name ) throws ClassNotFoundException { if ( ( context != null ) ( context.getClassResolver() != null ) ) Modified: commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/util/EnhancedClassLoader.java URL: http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/util/EnhancedClassLoader.java?rev=1461663r1=1461662r2=1461663view=diff == --- commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/util/EnhancedClassLoader.java (original) +++ commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/util/EnhancedClassLoader.java Wed Mar 27 15:47:54 2013 @@ -35,7 +35,7 @@ public class EnhancedClassLoader * === Overridden methods * === */ -public Class defineClass( String enhancedClassName, byte[] byteCode ) +public Class? defineClass( String enhancedClassName, byte[] byteCode ) { return defineClass( enhancedClassName, byteCode, 0, byteCode.length ); }
svn commit: r1461704 - /commons/proper/fileupload/tags/FILEUPLOAD_1_3/
Author: simonetripodi Date: Wed Mar 27 16:51:43 2013 New Revision: 1461704 URL: http://svn.apache.org/r1461704 Log: FileUpload RC2 passed to vote so this will be the release tag - http://markmail.org/message/syqfaf2tuno45jr4 Added: commons/proper/fileupload/tags/FILEUPLOAD_1_3/ - copied from r1461703, commons/proper/fileupload/tags/FILEUPLOAD_1_3_RC2/
svn commit: r1644 - in /release/commons/fileupload: binaries/ source/
Author: simonetripodi Date: Wed Mar 27 16:54:51 2013 New Revision: 1644 Log: FileUpload RC2 passed to vote so source and binaries archive can be promoted - http://markmail.org/message/syqfaf2tuno45jr4 Added: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz (with props) release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.asc (with props) release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.md5 release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.sha1 release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip (with props) release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.asc (with props) release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.md5 release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.sha1 release/commons/fileupload/source/commons-fileupload-1.3-src.tar.gz (with props) release/commons/fileupload/source/commons-fileupload-1.3-src.tar.gz.asc (with props) release/commons/fileupload/source/commons-fileupload-1.3-src.tar.gz.md5 release/commons/fileupload/source/commons-fileupload-1.3-src.tar.gz.sha1 release/commons/fileupload/source/commons-fileupload-1.3-src.zip (with props) release/commons/fileupload/source/commons-fileupload-1.3-src.zip.asc (with props) release/commons/fileupload/source/commons-fileupload-1.3-src.zip.md5 release/commons/fileupload/source/commons-fileupload-1.3-src.zip.sha1 Added: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz == Binary file - no diff available. Propchange: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz -- svn:mime-type = application/x-gzip Added: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.asc == Binary file - no diff available. Propchange: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.asc -- svn:mime-type = application/pgp-signature Added: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.md5 == --- release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.md5 (added) +++ release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.md5 Wed Mar 27 16:54:51 2013 @@ -0,0 +1 @@ +d354abbcf2de72525aded71fc5f3b354 \ No newline at end of file Added: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.sha1 == --- release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.sha1 (added) +++ release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.sha1 Wed Mar 27 16:54:51 2013 @@ -0,0 +1 @@ +33b0dee2bcbb628fc7647385b70e6ea5021c22cc \ No newline at end of file Added: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip == Binary file - no diff available. Propchange: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip -- svn:mime-type = application/zip Added: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.asc == Binary file - no diff available. Propchange: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.asc -- svn:mime-type = application/pgp-signature Added: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.md5 == --- release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.md5 (added) +++ release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.md5 Wed Mar 27 16:54:51 2013 @@ -0,0 +1 @@ +512c37586926f9fd453967985685509a \ No newline at end of file Added: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.sha1 == --- release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.sha1 (added) +++ release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.sha1 Wed Mar 27 16:54:51 2013 @@ -0,0 +1 @@ +39b4cbbb4e8ca0d894bd9fbd3e480ea1753e29d2 \ No newline at end of file Added: release/commons/fileupload/source/commons-fileupload-1.3-src.tar.gz == Binary
svn commit: r1644 - in /release/commons/fileupload: binaries/ source/
Author: simonetripodi Date: Wed Mar 27 16:54:51 2013 New Revision: 1644 Log: FileUpload RC2 passed to vote so source and binaries archive can be promoted - http://markmail.org/message/syqfaf2tuno45jr4 Added: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz (with props) release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.asc (with props) release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.md5 release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.sha1 release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip (with props) release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.asc (with props) release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.md5 release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.sha1 release/commons/fileupload/source/commons-fileupload-1.3-src.tar.gz (with props) release/commons/fileupload/source/commons-fileupload-1.3-src.tar.gz.asc (with props) release/commons/fileupload/source/commons-fileupload-1.3-src.tar.gz.md5 release/commons/fileupload/source/commons-fileupload-1.3-src.tar.gz.sha1 release/commons/fileupload/source/commons-fileupload-1.3-src.zip (with props) release/commons/fileupload/source/commons-fileupload-1.3-src.zip.asc (with props) release/commons/fileupload/source/commons-fileupload-1.3-src.zip.md5 release/commons/fileupload/source/commons-fileupload-1.3-src.zip.sha1 Added: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz == Binary file - no diff available. Propchange: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz -- svn:mime-type = application/x-gzip Added: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.asc == Binary file - no diff available. Propchange: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.asc -- svn:mime-type = application/pgp-signature Added: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.md5 == --- release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.md5 (added) +++ release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.md5 Wed Mar 27 16:54:51 2013 @@ -0,0 +1 @@ +d354abbcf2de72525aded71fc5f3b354 \ No newline at end of file Added: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.sha1 == --- release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.sha1 (added) +++ release/commons/fileupload/binaries/commons-fileupload-1.3-bin.tar.gz.sha1 Wed Mar 27 16:54:51 2013 @@ -0,0 +1 @@ +33b0dee2bcbb628fc7647385b70e6ea5021c22cc \ No newline at end of file Added: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip == Binary file - no diff available. Propchange: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip -- svn:mime-type = application/zip Added: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.asc == Binary file - no diff available. Propchange: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.asc -- svn:mime-type = application/pgp-signature Added: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.md5 == --- release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.md5 (added) +++ release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.md5 Wed Mar 27 16:54:51 2013 @@ -0,0 +1 @@ +512c37586926f9fd453967985685509a \ No newline at end of file Added: release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.sha1 == --- release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.sha1 (added) +++ release/commons/fileupload/binaries/commons-fileupload-1.3-bin.zip.sha1 Wed Mar 27 16:54:51 2013 @@ -0,0 +1 @@ +39b4cbbb4e8ca0d894bd9fbd3e480ea1753e29d2 \ No newline at end of file Added: release/commons/fileupload/source/commons-fileupload-1.3-src.tar.gz == Binary
svn commit: r856185 - in /websites/production/commons/content/proper/commons-fileupload: ./ apidocs/ apidocs/org/apache/commons/fileupload/ apidocs/org/apache/commons/fileupload/class-use/ apidocs/org
Author: simonetripodi Date: Wed Mar 27 16:59:49 2013 New Revision: 856185 Log: Site checkin for project Commons FileUpload [This commit notification would consist of 150 parts, which exceeds the limit of 50 ones, so it was shortened to the summary.]
svn commit: r1646 - /release/commons/fileupload/RELEASE-NOTES.txt
Author: simonetripodi Date: Wed Mar 27 20:37:53 2013 New Revision: 1646 Log: added missing release notes for fileupload component Added: release/commons/fileupload/RELEASE-NOTES.txt Added: release/commons/fileupload/RELEASE-NOTES.txt == --- release/commons/fileupload/RELEASE-NOTES.txt (added) +++ release/commons/fileupload/RELEASE-NOTES.txt Wed Mar 27 20:37:53 2013 @@ -0,0 +1,98 @@ +!-- + 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. +-- + + Apache Commons-FileUpload +Version 1.3 + Release Notes + + +INTRODUCTION + + +This is a maintenance release, new projects are encouraged to +use this release of FileUpload. +There is no urgency for existing projects to upgrade. + +IMPORTANT NOTES + + + * SECURITY - CVE-2013-0248, see http://seclists.org/fulldisclosure/2013/Mar/76 + +DEPENDENCIES += + +FileUpload 1.3 users should upgrade to the recommended dependency set below +where possible. + +The Recommended Dependency Set for FileUpload 1.3 is: + Apache Commons-IO 2.2 + +Sub-task += + + * [FILEUPLOAD-216] - Update the project tree dirs according to default Maven conventions + * [FILEUPLOAD-217] - drop JDK1.3 support and update to Java5 + * [FILEUPLOAD-218] - Update version in POM + * [FILEUPLOAD-219] - upgrade tests to JUnit 4 + * [FILEUPLOAD-220] - replace package.html with package-info.java + * [FILEUPLOAD-221] - FileItemHeadersImpl can now use LinkedHashMap + * [FILEUPLOAD-222] - Mark @deprecated classes/methods with @Deprecated annotation + * [FILEUPLOAD-233] - Base64Decoder doesn't correctly implement RFC 4648 + +Bug += + + * [FILEUPLOAD-143] - Stream ended unexpectedly when posting from a Flash client + * [FILEUPLOAD-173] - Manifest for OSGi has invalid syntax + * [FILEUPLOAD-183] - commons-io dependency does not get loaded by maven if only dependency to commons-fileupload is specified + * [FILEUPLOAD-185] - http://commons.apache.org/fileupload/index.html is out of date + * [FILEUPLOAD-186] - http://commons.apache.org/fileupload/index.html should not mention nightly builds + * [FILEUPLOAD-189] - DiskFileItemFactory use of FileCleaningTracker is documented or coded wrong + * [FILEUPLOAD-195] - Error reading the file size larger than 2 gb + * [FILEUPLOAD-197] - ServletFileUpload isMultipartContent method does not support HTTP PUT + * [FILEUPLOAD-199] - Uploads have unexpected results for files with non-ASCII names - support RFC2047 + * [FILEUPLOAD-202] - org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly + * [FILEUPLOAD-204] - FileItem.getHeaders() returns always null. + * [FILEUPLOAD-212] - Insecure request size checking + * [FILEUPLOAD-214] - ServletFileUpload only accepts POST requests + * [FILEUPLOAD-228] - (Servlet|Portlet)RequestContext#contentLength() must return request.getContentLength() if Content-length header is not available + * [FILEUPLOAD-229] - toLowerCase() is Locale-dependent; should use toLowerCase(Locale.ENGLISH) instead + * [FILEUPLOAD-232] - There are no unit tests for the new utils.mime classes + +Improvement += + + * [FILEUPLOAD-182] - Documentation: add simple HTML form example to fileupload user guide + * [FILEUPLOAD-207] - enhance file read/write performance + * [FILEUPLOAD-209] - Add Support for Generic Types + * [FILEUPLOAD-210] - Process HTTP Requests Into Maps + * [FILEUPLOAD-223] - Update commons-io dependency to latest version that supports JDK1.5 + * [FILEUPLOAD-224] - Avoid string concatenations while parsing headers, use buffers instead + * [FILEUPLOAD-225] - Replace java.rmi.server.UID() with java.util.UUID + * [FILEUPLOAD-226] - DiskFileItem.counter could be converted to AtomicInteger (or AtomicLong?) + * [FILEUPLOAD-227] - Private immutable fields which could be final + +Task += + + * [FILEUPLOAD-201] - Update to JDK 1.5 and bump IO dependency to 2.0.1 + * [FILEUPLOAD-215] - version 1.3 improvement tasks + +OTHER NOTES + + + * This is the first version
svn commit: r1646 - /release/commons/fileupload/RELEASE-NOTES.txt
Author: simonetripodi Date: Wed Mar 27 20:37:53 2013 New Revision: 1646 Log: added missing release notes for fileupload component Added: release/commons/fileupload/RELEASE-NOTES.txt Added: release/commons/fileupload/RELEASE-NOTES.txt == --- release/commons/fileupload/RELEASE-NOTES.txt (added) +++ release/commons/fileupload/RELEASE-NOTES.txt Wed Mar 27 20:37:53 2013 @@ -0,0 +1,98 @@ +!-- + 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. +-- + + Apache Commons-FileUpload +Version 1.3 + Release Notes + + +INTRODUCTION + + +This is a maintenance release, new projects are encouraged to +use this release of FileUpload. +There is no urgency for existing projects to upgrade. + +IMPORTANT NOTES + + + * SECURITY - CVE-2013-0248, see http://seclists.org/fulldisclosure/2013/Mar/76 + +DEPENDENCIES += + +FileUpload 1.3 users should upgrade to the recommended dependency set below +where possible. + +The Recommended Dependency Set for FileUpload 1.3 is: + Apache Commons-IO 2.2 + +Sub-task += + + * [FILEUPLOAD-216] - Update the project tree dirs according to default Maven conventions + * [FILEUPLOAD-217] - drop JDK1.3 support and update to Java5 + * [FILEUPLOAD-218] - Update version in POM + * [FILEUPLOAD-219] - upgrade tests to JUnit 4 + * [FILEUPLOAD-220] - replace package.html with package-info.java + * [FILEUPLOAD-221] - FileItemHeadersImpl can now use LinkedHashMap + * [FILEUPLOAD-222] - Mark @deprecated classes/methods with @Deprecated annotation + * [FILEUPLOAD-233] - Base64Decoder doesn't correctly implement RFC 4648 + +Bug += + + * [FILEUPLOAD-143] - Stream ended unexpectedly when posting from a Flash client + * [FILEUPLOAD-173] - Manifest for OSGi has invalid syntax + * [FILEUPLOAD-183] - commons-io dependency does not get loaded by maven if only dependency to commons-fileupload is specified + * [FILEUPLOAD-185] - http://commons.apache.org/fileupload/index.html is out of date + * [FILEUPLOAD-186] - http://commons.apache.org/fileupload/index.html should not mention nightly builds + * [FILEUPLOAD-189] - DiskFileItemFactory use of FileCleaningTracker is documented or coded wrong + * [FILEUPLOAD-195] - Error reading the file size larger than 2 gb + * [FILEUPLOAD-197] - ServletFileUpload isMultipartContent method does not support HTTP PUT + * [FILEUPLOAD-199] - Uploads have unexpected results for files with non-ASCII names - support RFC2047 + * [FILEUPLOAD-202] - org.apache.commons.fileupload.FileUploadBase$IOFileUploadException: Processing of multipart/form-data request failed. Stream ended unexpectedly + * [FILEUPLOAD-204] - FileItem.getHeaders() returns always null. + * [FILEUPLOAD-212] - Insecure request size checking + * [FILEUPLOAD-214] - ServletFileUpload only accepts POST requests + * [FILEUPLOAD-228] - (Servlet|Portlet)RequestContext#contentLength() must return request.getContentLength() if Content-length header is not available + * [FILEUPLOAD-229] - toLowerCase() is Locale-dependent; should use toLowerCase(Locale.ENGLISH) instead + * [FILEUPLOAD-232] - There are no unit tests for the new utils.mime classes + +Improvement += + + * [FILEUPLOAD-182] - Documentation: add simple HTML form example to fileupload user guide + * [FILEUPLOAD-207] - enhance file read/write performance + * [FILEUPLOAD-209] - Add Support for Generic Types + * [FILEUPLOAD-210] - Process HTTP Requests Into Maps + * [FILEUPLOAD-223] - Update commons-io dependency to latest version that supports JDK1.5 + * [FILEUPLOAD-224] - Avoid string concatenations while parsing headers, use buffers instead + * [FILEUPLOAD-225] - Replace java.rmi.server.UID() with java.util.UUID + * [FILEUPLOAD-226] - DiskFileItem.counter could be converted to AtomicInteger (or AtomicLong?) + * [FILEUPLOAD-227] - Private immutable fields which could be final + +Task += + + * [FILEUPLOAD-201] - Update to JDK 1.5 and bump IO dependency to 2.0.1 + * [FILEUPLOAD-215] - version 1.3 improvement tasks + +OTHER NOTES + + + * This is the first version
svn commit: r1461182 - /commons/proper/fileupload/trunk/src/main/assembly/src.xml
Author: simonetripodi Date: Tue Mar 26 15:18:46 2013 New Revision: 1461182 URL: http://svn.apache.org/r1461182 Log: releng: DOAP descriptor not part of the source archive release Modified: commons/proper/fileupload/trunk/src/main/assembly/src.xml Modified: commons/proper/fileupload/trunk/src/main/assembly/src.xml URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/assembly/src.xml?rev=1461182r1=1461181r2=1461182view=diff == --- commons/proper/fileupload/trunk/src/main/assembly/src.xml (original) +++ commons/proper/fileupload/trunk/src/main/assembly/src.xml Tue Mar 26 15:18:46 2013 @@ -31,6 +31,7 @@ exclude**/.classpath/exclude exclude**/.project/exclude exclude**/.settings//exclude +exclude**/.doap_*.rdf/exclude exclude**/bin//exclude exclude**/.externalToolBuilders//exclude exclude**/target//exclude
svn commit: r1461185 - /commons/proper/fileupload/trunk/src/main/assembly/bin.xml
Author: simonetripodi Date: Tue Mar 26 15:25:20 2013 New Revision: 1461185 URL: http://svn.apache.org/r1461185 Log: releng: as pointed by Manu and Bene, just include the main artifact in the -bin archive Modified: commons/proper/fileupload/trunk/src/main/assembly/bin.xml Modified: commons/proper/fileupload/trunk/src/main/assembly/bin.xml URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/assembly/bin.xml?rev=1461185r1=1461184r2=1461185view=diff == --- commons/proper/fileupload/trunk/src/main/assembly/bin.xml (original) +++ commons/proper/fileupload/trunk/src/main/assembly/bin.xml Tue Mar 26 15:25:20 2013 @@ -35,7 +35,7 @@ directorytarget/directory outputDirectorylib/outputDirectory includes -include*.jar/include +include${project.build.finalName}.jar/include /includes /fileSet /fileSets
svn commit: r1461190 - /commons/proper/fileupload/trunk/src/main/assembly/bin.xml
Author: simonetripodi Date: Tue Mar 26 15:32:12 2013 New Revision: 1461190 URL: http://svn.apache.org/r1461190 Log: trivial: just avoid to hardcode the build directory that can potentially be modified in the pom Modified: commons/proper/fileupload/trunk/src/main/assembly/bin.xml Modified: commons/proper/fileupload/trunk/src/main/assembly/bin.xml URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/assembly/bin.xml?rev=1461190r1=1461189r2=1461190view=diff == --- commons/proper/fileupload/trunk/src/main/assembly/bin.xml (original) +++ commons/proper/fileupload/trunk/src/main/assembly/bin.xml Tue Mar 26 15:32:12 2013 @@ -32,7 +32,7 @@ /includes /fileSet fileSet - directorytarget/directory + directory${project.build.directory}/directory outputDirectorylib/outputDirectory includes include${project.build.finalName}.jar/include
svn commit: r1461191 - /commons/proper/fileupload/trunk/src/main/assembly/src.xml
Author: simonetripodi Date: Tue Mar 26 15:42:39 2013 New Revision: 1461191 URL: http://svn.apache.org/r1461191 Log: trivial: ${artifactId}-${version} = ${project.build.finalName} Modified: commons/proper/fileupload/trunk/src/main/assembly/src.xml Modified: commons/proper/fileupload/trunk/src/main/assembly/src.xml URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/assembly/src.xml?rev=1461191r1=1461190r2=1461191view=diff == --- commons/proper/fileupload/trunk/src/main/assembly/src.xml (original) +++ commons/proper/fileupload/trunk/src/main/assembly/src.xml Tue Mar 26 15:42:39 2013 @@ -23,7 +23,7 @@ formattar.gz/format formatzip/format /formats - baseDirectory${artifactId}-${version}-src/baseDirectory + baseDirectory${project.build.finalName}-src/baseDirectory fileSets fileSet directory${basedir}/directory
svn commit: r1461194 - /commons/proper/fileupload/trunk/src/main/assembly/bin.xml
Author: simonetripodi Date: Tue Mar 26 15:55:33 2013 New Revision: 1461194 URL: http://svn.apache.org/r1461194 Log: trivial: baseDirectory not specified in -bin archive Modified: commons/proper/fileupload/trunk/src/main/assembly/bin.xml Modified: commons/proper/fileupload/trunk/src/main/assembly/bin.xml URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/assembly/bin.xml?rev=1461194r1=1461193r2=1461194view=diff == --- commons/proper/fileupload/trunk/src/main/assembly/bin.xml (original) +++ commons/proper/fileupload/trunk/src/main/assembly/bin.xml Tue Mar 26 15:55:33 2013 @@ -23,6 +23,7 @@ formattar.gz/format formatzip/format /formats + baseDirectory${project.build.finalName}-bin/baseDirectory includeSiteDirectorytrue/includeSiteDirectory fileSets fileSet
svn commit: r1461325 - /commons/proper/fileupload/trunk/src/main/assembly/src.xml
Author: simonetripodi Date: Tue Mar 26 21:32:35 2013 New Revision: 1461325 URL: http://svn.apache.org/r1461325 Log: releng: DOAP descriptor not part of the source archive release Modified: commons/proper/fileupload/trunk/src/main/assembly/src.xml Modified: commons/proper/fileupload/trunk/src/main/assembly/src.xml URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/assembly/src.xml?rev=1461325r1=1461324r2=1461325view=diff == --- commons/proper/fileupload/trunk/src/main/assembly/src.xml (original) +++ commons/proper/fileupload/trunk/src/main/assembly/src.xml Tue Mar 26 21:32:35 2013 @@ -31,7 +31,7 @@ exclude**/.classpath/exclude exclude**/.project/exclude exclude**/.settings//exclude -exclude**/.doap_*.rdf/exclude +exclude**/doap_*.rdf/exclude exclude**/bin//exclude exclude**/.externalToolBuilders//exclude exclude**/target//exclude
svn commit: r1461327 - /commons/proper/fileupload/trunk/src/main/assembly/src.xml
Author: simonetripodi Date: Tue Mar 26 21:34:33 2013 New Revision: 1461327 URL: http://svn.apache.org/r1461327 Log: trivial: just avoid to hardcode the build directory that can potentially be modified in the pom Modified: commons/proper/fileupload/trunk/src/main/assembly/src.xml Modified: commons/proper/fileupload/trunk/src/main/assembly/src.xml URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/assembly/src.xml?rev=1461327r1=1461326r2=1461327view=diff == --- commons/proper/fileupload/trunk/src/main/assembly/src.xml (original) +++ commons/proper/fileupload/trunk/src/main/assembly/src.xml Tue Mar 26 21:34:33 2013 @@ -34,7 +34,7 @@ exclude**/doap_*.rdf/exclude exclude**/bin//exclude exclude**/.externalToolBuilders//exclude -exclude**/target//exclude +exclude**/${project.build.directory}//exclude exclude**/download*.cgi/exclude /excludes /fileSet
svn commit: r1460324 - in /commons/proper/fileupload/trunk: RELEASE-NOTES.txt src/changes/changes.xml
Author: simonetripodi Date: Sun Mar 24 12:10:44 2013 New Revision: 1460324 URL: http://svn.apache.org/r1460324 Log: releng: changes list in sync with latest issues on JIRA Modified: commons/proper/fileupload/trunk/RELEASE-NOTES.txt commons/proper/fileupload/trunk/src/changes/changes.xml Modified: commons/proper/fileupload/trunk/RELEASE-NOTES.txt URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/RELEASE-NOTES.txt?rev=1460324r1=1460323r2=1460324view=diff == --- commons/proper/fileupload/trunk/RELEASE-NOTES.txt (original) +++ commons/proper/fileupload/trunk/RELEASE-NOTES.txt Sun Mar 24 12:10:44 2013 @@ -51,6 +51,7 @@ Sub-task * [FILEUPLOAD-220] - replace package.html with package-info.java * [FILEUPLOAD-221] - FileItemHeadersImpl can now use LinkedHashMap * [FILEUPLOAD-222] - Mark @deprecated classes/methods with @Deprecated annotation + * [FILEUPLOAD-233] - Base64Decoder doesn't correctly implement RFC 4648 Bug = @@ -70,6 +71,7 @@ Bug * [FILEUPLOAD-214] - ServletFileUpload only accepts POST requests * [FILEUPLOAD-228] - (Servlet|Portlet)RequestContext#contentLength() must return request.getContentLength() if Content-length header is not available * [FILEUPLOAD-229] - toLowerCase() is Locale-dependent; should use toLowerCase(Locale.ENGLISH) instead + * [FILEUPLOAD-232] - There are no unit tests for the new utils.mime classes Improvement = Modified: commons/proper/fileupload/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/changes/changes.xml?rev=1460324r1=1460323r2=1460324view=diff == --- commons/proper/fileupload/trunk/src/changes/changes.xml (original) +++ commons/proper/fileupload/trunk/src/changes/changes.xml Sun Mar 24 12:10:44 2013 @@ -72,6 +72,9 @@ The action type attribute can be add,u action issue=FILEUPLOAD-222 dev=simonetripodi type=update Mark @deprecated classes/methods with @Deprecated annotation /action + action issue=FILEUPLOAD-233 dev=sebb type=fix due-to=Simone Tripodi +Base64Decoder doesn't correctly implement RFC 4648 + /action !-- Bug -- action issue=FILEUPLOAD-143 dev=jochen type=fix due-to=Luke Scott Stream ended unexpectedly when posting from a Flash client @@ -121,6 +124,9 @@ The action type attribute can be add,u action issue=FILEUPLOAD-229 dev=simonetripodi type=fix due-to=seb toLowerCase() is Locale-dependent; should use toLowerCase(Locale.ENGLISH) instead /action + action issue=FILEUPLOAD-229 dev=sebb,simonetripodi type=fix due-to=seb +There are no unit tests for the new utils.mime classes + /action !-- Improvement -- action issue=FILEUPLOAD-182 dev=simonetripodi type=add due-to=Chris Lott Documentation: add simple HTML form example to fileupload user guide
svn commit: r1460326 - in /commons/proper/fileupload/trunk: RELEASE-NOTES.txt src/changes/changes.xml
Author: simonetripodi Date: Sun Mar 24 12:12:05 2013 New Revision: 1460326 URL: http://svn.apache.org/r1460326 Log: releng: FILEUPLOAD-215 edited to reflect current 1.3 release, not old 1.2.3 development release Modified: commons/proper/fileupload/trunk/RELEASE-NOTES.txt commons/proper/fileupload/trunk/src/changes/changes.xml Modified: commons/proper/fileupload/trunk/RELEASE-NOTES.txt URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/RELEASE-NOTES.txt?rev=1460326r1=1460325r2=1460326view=diff == --- commons/proper/fileupload/trunk/RELEASE-NOTES.txt (original) +++ commons/proper/fileupload/trunk/RELEASE-NOTES.txt Sun Mar 24 12:12:05 2013 @@ -90,7 +90,7 @@ Task = * [FILEUPLOAD-201] - Update to JDK 1.5 and bump IO dependency to 2.0.1 - * [FILEUPLOAD-215] - version 1.2.3 improvement tasks + * [FILEUPLOAD-215] - version 1.3 improvement tasks OTHER NOTES Modified: commons/proper/fileupload/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/changes/changes.xml?rev=1460326r1=1460325r2=1460326view=diff == --- commons/proper/fileupload/trunk/src/changes/changes.xml (original) +++ commons/proper/fileupload/trunk/src/changes/changes.xml Sun Mar 24 12:12:05 2013 @@ -160,7 +160,7 @@ The action type attribute can be add,u Update to JDK 1.5 and bump IO dependency to 2.0.1 /action action issue=FILEUPLOAD-215 dev=simonetripodi type=update -version 1.2.3 improvement tasks +version 1.3 improvement tasks /action /release
svn commit: r1460328 - /commons/proper/fileupload/trunk/src/changes/changes.xml
Author: simonetripodi Date: Sun Mar 24 12:14:40 2013 New Revision: 1460328 URL: http://svn.apache.org/r1460328 Log: releng: updated estimated release date Modified: commons/proper/fileupload/trunk/src/changes/changes.xml Modified: commons/proper/fileupload/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/changes/changes.xml?rev=1460328r1=1460327r2=1460328view=diff == --- commons/proper/fileupload/trunk/src/changes/changes.xml (original) +++ commons/proper/fileupload/trunk/src/changes/changes.xml Sun Mar 24 12:14:40 2013 @@ -43,7 +43,7 @@ The action type attribute can be add,u /properties body -release version=1.3 description=maintenance release, JDK1.5 update date=2013-02-12 +release version=1.3 description=maintenance release, JDK1.5 update date=2013-03-27 !-- important notes -- action dev=markt type=fix SECURITY - CVE-2013-0248. Update the Javadoc and documentation to make
svn commit: r1460329 - /commons/proper/fileupload/trunk/src/site/xdoc/index.xml
Author: simonetripodi Date: Sun Mar 24 12:17:28 2013 New Revision: 1460329 URL: http://svn.apache.org/r1460329 Log: releng: updated estimated release date Modified: commons/proper/fileupload/trunk/src/site/xdoc/index.xml Modified: commons/proper/fileupload/trunk/src/site/xdoc/index.xml URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/site/xdoc/index.xml?rev=1460329r1=1460328r2=1460329view=diff == --- commons/proper/fileupload/trunk/src/site/xdoc/index.xml (original) +++ commons/proper/fileupload/trunk/src/site/xdoc/index.xml Sun Mar 24 12:17:28 2013 @@ -66,7 +66,7 @@ section name=Downloading subsection name=Full Releases -pstrongFileUpload 1.3/strong - 12 March 2013/p +pstrongFileUpload 1.3/strong - 27 March 2013/p ul liDownload the binary and source distributions from a mirror site a href=http://commons.apache.org/fileupload/download_fileupload.cgi;here/a
svn commit: r1460334 - /commons/proper/fileupload/trunk/src/site/site.xml
Author: simonetripodi Date: Sun Mar 24 12:27:48 2013 New Revision: 1460334 URL: http://svn.apache.org/r1460334 Log: added missing direct download link in the site menu Modified: commons/proper/fileupload/trunk/src/site/site.xml Modified: commons/proper/fileupload/trunk/src/site/site.xml URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/site/site.xml?rev=1460334r1=1460333r2=1460334view=diff == --- commons/proper/fileupload/trunk/src/site/site.xml (original) +++ commons/proper/fileupload/trunk/src/site/site.xml Sun Mar 24 12:27:48 2013 @@ -31,6 +31,7 @@ item name=Streaming APIhref=/streaming.html / item name=FAQ href=/faq.html / item name=Javadoc href=apidocs/index.html / + item name=Download href=/download_fileupload.cgi / item name=Mailing listshref=/mail-lists.html / item name=Issue Tracking href=/issue-tracking.html / item name=Team href=/team-list.html /
svn commit: r1460336 - /commons/proper/fileupload/trunk/doap_fileupload.rdf
Author: simonetripodi Date: Sun Mar 24 12:32:39 2013 New Revision: 1460336 URL: http://svn.apache.org/r1460336 Log: releng: updated estimated release date Modified: commons/proper/fileupload/trunk/doap_fileupload.rdf Modified: commons/proper/fileupload/trunk/doap_fileupload.rdf URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/doap_fileupload.rdf?rev=1460336r1=1460335r2=1460336view=diff == --- commons/proper/fileupload/trunk/doap_fileupload.rdf (original) +++ commons/proper/fileupload/trunk/doap_fileupload.rdf Sun Mar 24 12:32:39 2013 @@ -40,7 +40,7 @@ release Version namecommons-fileupload/name -created2013-02-12/created +created2013-03-27/created revision1.3/revision /Version Version
svn commit: r1460337 - /commons/proper/fileupload/trunk/pom.xml
Author: simonetripodi Date: Sun Mar 24 12:35:59 2013 New Revision: 1460337 URL: http://svn.apache.org/r1460337 Log: [maven-release-plugin] prepare release FILEUPLOAD_1_3_RC2 Modified: commons/proper/fileupload/trunk/pom.xml Modified: commons/proper/fileupload/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/pom.xml?rev=1460337r1=1460336r2=1460337view=diff == --- commons/proper/fileupload/trunk/pom.xml (original) +++ commons/proper/fileupload/trunk/pom.xml Sun Mar 24 12:35:59 2013 @@ -26,7 +26,7 @@ groupIdcommons-fileupload/groupId artifactIdcommons-fileupload/artifactId - version1.3-SNAPSHOT/version + version1.3/version nameCommons FileUpload/name description @@ -165,9 +165,9 @@ /contributors scm - connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/fileupload/trunk/connection - developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/fileupload/trunk/developerConnection -urlhttp://svn.apache.org/viewvc/commons/proper/fileupload/trunk/url + connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/fileupload/tags/FILEUPLOAD_1_3_RC2/connection + developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/fileupload/tags/FILEUPLOAD_1_3_RC2/developerConnection + urlhttp://svn.apache.org/viewvc/commons/proper/fileupload/tags/FILEUPLOAD_1_3_RC2/url /scm issueManagement systemjira/system
svn commit: r1460338 - /commons/proper/fileupload/tags/FILEUPLOAD_1_3_RC2/
Author: simonetripodi Date: Sun Mar 24 12:36:06 2013 New Revision: 1460338 URL: http://svn.apache.org/r1460338 Log: [maven-release-plugin] copy for tag FILEUPLOAD_1_3_RC2 Added: commons/proper/fileupload/tags/FILEUPLOAD_1_3_RC2/ - copied from r1460337, commons/proper/fileupload/trunk/
svn commit: r1460339 - /commons/proper/fileupload/trunk/pom.xml
Author: simonetripodi Date: Sun Mar 24 12:36:11 2013 New Revision: 1460339 URL: http://svn.apache.org/r1460339 Log: [maven-release-plugin] prepare for next development iteration Modified: commons/proper/fileupload/trunk/pom.xml Modified: commons/proper/fileupload/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/pom.xml?rev=1460339r1=1460338r2=1460339view=diff == --- commons/proper/fileupload/trunk/pom.xml (original) +++ commons/proper/fileupload/trunk/pom.xml Sun Mar 24 12:36:11 2013 @@ -26,7 +26,7 @@ groupIdcommons-fileupload/groupId artifactIdcommons-fileupload/artifactId - version1.3/version + version1.4-SNAPSHOT/version nameCommons FileUpload/name description @@ -165,9 +165,9 @@ /contributors scm - connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/fileupload/tags/FILEUPLOAD_1_3_RC2/connection - developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/fileupload/tags/FILEUPLOAD_1_3_RC2/developerConnection - urlhttp://svn.apache.org/viewvc/commons/proper/fileupload/tags/FILEUPLOAD_1_3_RC2/url + connectionscm:svn:http://svn.apache.org/repos/asf/commons/proper/fileupload/trunk/connection + developerConnectionscm:svn:https://svn.apache.org/repos/asf/commons/proper/fileupload/trunk/developerConnection +urlhttp://svn.apache.org/viewvc/commons/proper/fileupload/trunk/url /scm issueManagement systemjira/system
svn commit: r1459183 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java
Author: simonetripodi Date: Thu Mar 21 08:17:36 2013 New Revision: 1459183 URL: http://svn.apache.org/r1459183 Log: trivial: Line has trailing spaces Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java?rev=1459183r1=1459182r2=1459183view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java Thu Mar 21 08:17:36 2013 @@ -128,7 +128,7 @@ final class Base64Decoder { outLen++; } } else if (cache[3] != PAD_BYTE) { // if byte 3 is pad, byte 4 must be pad too -throw new IOException(Invalid Base64 input: incorrect padding); +throw new IOException(Invalid Base64 input: incorrect padding); } cachedBytes = 0; }
svn commit: r1459184 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java
Author: simonetripodi Date: Thu Mar 21 08:18:19 2013 New Revision: 1459184 URL: http://svn.apache.org/r1459184 Log: trivial: '{' is not preceded with whitespace. Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java?rev=1459184r1=1459183r2=1459184view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java Thu Mar 21 08:18:19 2013 @@ -134,7 +134,7 @@ final class Base64Decoder { } } // Check for anything left over -if (cachedBytes != 0){ +if (cachedBytes != 0) { throw new IOException(Invalid Base64 input: truncated); } return outLen;
svn commit: r1459188 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java
Author: simonetripodi Date: Thu Mar 21 08:27:25 2013 New Revision: 1459188 URL: http://svn.apache.org/r1459188 Log: trivial: '3' is a magic number. Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java?rev=1459188r1=1459187r2=1459188view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java Thu Mar 21 08:27:25 2013 @@ -122,11 +122,13 @@ final class Base64Decoder { // CHECKSTYLE IGNORE MagicNumber FOR NEXT 1 LINE out.write((cache[1] 4) | (cache[2] 2)); // 4 bits of b2 plus 4 bits of b3 outLen++; +// CHECKSTYLE IGNORE MagicNumber FOR NEXT 1 LINE if (cache[3] != PAD_BYTE) { // CHECKSTYLE IGNORE MagicNumber FOR NEXT 1 LINE out.write((cache[2] 6) | cache[3]);// 2 bits of b3 plus 6 bits of b4 outLen++; } +// CHECKSTYLE IGNORE MagicNumber FOR NEXT 1 LINE } else if (cache[3] != PAD_BYTE) { // if byte 3 is pad, byte 4 must be pad too throw new IOException(Invalid Base64 input: incorrect padding); }
svn commit: r1458684 - /commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/SizesTest.java
Author: simonetripodi Date: Wed Mar 20 08:31:53 2013 New Revision: 1458684 URL: http://svn.apache.org/r1458684 Log: trivial: dropped trailing spaces in empty lines Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/SizesTest.java Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/SizesTest.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/SizesTest.java?rev=1458684r1=1458683r2=1458684view=diff == --- commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/SizesTest.java (original) +++ commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/SizesTest.java Wed Mar 20 08:31:53 2013 @@ -168,7 +168,7 @@ public class SizesTest extends FileUploa } catch (FileUploadBase.FileSizeLimitExceededException e) { assertEquals(5, e.getPermittedSize()); } - + // provided Content-Length is wrong, actual content is larger - handled by LimitedInputStream upload = new ServletFileUpload(new DiskFileItemFactory()); upload.setFileSizeMax(15); @@ -205,7 +205,7 @@ public class SizesTest extends FileUploa ServletFileUpload upload = new ServletFileUpload(new DiskFileItemFactory()); upload.setFileSizeMax(-1); upload.setSizeMax(200); - + MockHttpServletRequest req = new MockHttpServletRequest(request.getBytes(US-ASCII), CONTENT_TYPE); try { upload.parseRequest(req); @@ -225,7 +225,7 @@ public class SizesTest extends FileUploa Content-Type: text/whatever\r\n + Content-Length: 10\r\n + \r\n + -This is the content of the file\n + +This is the content of the file\n + \r\n + -1234\r\n + Content-Disposition: form-data; name=\file2\; filename=\foo2.tab\\r\n + @@ -246,15 +246,15 @@ public class SizesTest extends FileUploa MockHttpServletRequest req = new MockHttpServletRequest(request.getBytes(US-ASCII), CONTENT_TYPE); req.setContentLength(-1); req.setReadLimit(10); - + FileItemIterator it = upload.getItemIterator(req); assertTrue(it.hasNext()); - + FileItemStream item = it.next(); assertFalse(item.isFormField()); assertEquals(file1, item.getFieldName()); assertEquals(foo1.tab, item.getName()); - + try { InputStream stream = item.openStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream();
svn commit: r1458210 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java
Author: simonetripodi Date: Tue Mar 19 10:21:19 2013 New Revision: 1458210 URL: http://svn.apache.org/r1458210 Log: extracted and documented constants that are used inside each algorithm iteration Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java?rev=1458210r1=1458209r2=1458210view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Tue Mar 19 10:21:19 2013 @@ -31,11 +31,31 @@ import java.util.Map; public final class MimeUtility { /** + * The {@code US-ASCII} charset identifier constant. + */ +private static final String US_ASCII_CHARSET = US-ASCII; + +/** + * The marker to indicate text is encoded with BASE64 algorithm. + */ +private static final String BASE64_ENCODING_MARKER = B; + +/** + * The marker to indicate text is encoded with QuotedPrintable algorithm. + */ +private static final String QUOTEDPRINTABLE_ENCODING_MARKER = Q; + +/** * If the text contains any encoded tokens, those tokens will be marked with =?. */ private static final String ENCODED_TOKEN_MARKER = =?; /** + * If the text contains any encoded tokens, those tokens will terminate with =?. + */ +private static final String ENCODED_TOKEN_FINISHER = ?=; + +/** * The linear whitespace chars sequence. */ private static final String LINEAR_WHITESPACE = \t\r\n; @@ -203,7 +223,7 @@ public final class MimeUtility { String encoding = word.substring(charsetPos + 1, encodingPos); // and finally the encoded text. -int encodedTextPos = word.indexOf(?=, encodingPos + 1); +int encodedTextPos = word.indexOf(ENCODED_TOKEN_FINISHER, encodingPos + 1); if (encodedTextPos == -1) { throw new ParseException(Missing encoded text in RFC 2047 encoded-word: + word); } @@ -219,12 +239,12 @@ public final class MimeUtility { // the decoder writes directly to an output stream. ByteArrayOutputStream out = new ByteArrayOutputStream(encodedText.length()); -byte[] encodedData = encodedText.getBytes(US-ASCII); +byte[] encodedData = encodedText.getBytes(US_ASCII_CHARSET); // Base64 encoded? -if (encoding.equals(B)) { +if (encoding.equals(BASE64_ENCODING_MARKER)) { Base64Decoder.decode(encodedData, 0, encodedData.length, out); -} else if (encoding.equals(Q)) { // maybe quoted printable. +} else if (encoding.equals(QUOTEDPRINTABLE_ENCODING_MARKER)) { // maybe quoted printable. QuotedPrintableDecoder.decode(encodedData, 0, encodedData.length, out); } else { throw new UnsupportedEncodingException(Unknown RFC 2047 encoding: + encoding);
svn commit: r1458213 - /commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java
Author: simonetripodi Date: Tue Mar 19 10:37:37 2013 New Revision: 1458213 URL: http://svn.apache.org/r1458213 Log: initial checkin of Base64 Decoder test case, which clearly demonstrate the current Base64 implementation is broken Added: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java (with props) Added: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java?rev=1458213view=auto == --- commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java (added) +++ commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java Tue Mar 19 10:37:37 2013 @@ -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.fileupload.util.mime; + +import static org.junit.Assert.assertArrayEquals; + +import java.io.ByteArrayOutputStream; + +import org.junit.Test; + +/** + * @since 1.3 + */ +public final class Base64DecoderTestCase { + +private static final String US_ASCII_CHARSET = US-ASCII; + +/** + * Tests RFC 4648 section 10 test vectors. + * ul + * liBASE64() = /li + * liBASE64(f) = Zg==/li + * liBASE64(fo) = Zm8=/li + * liBASE64(foo) = Zm9v/li + * liBASE64(foob) = Zm9vYg==/li + * liBASE64(fooba) = Zm9vYmE=/li + * liBASE64(foobar) = Zm9vYmFy/li + * /ul + * + * @see a href=http://tools.ietf.org/html/rfc4648;http://tools.ietf.org/html/rfc4648/a + */ +@Test +public void rfc4648Section10Decode() throws Exception { +// assertEncoded(, ); +assertEncoded(f, Zg==); +assertEncoded(fo, Zm8=); +// assertEncoded(foo, Zm9v); +assertEncoded(foob, Zm9vYg==); +assertEncoded(fooba, Zm9vYmE=); +// assertEncoded(foobar, Zm9vYmFy); +} + +private static void assertEncoded(String clearText, String encoded) throws Exception { +byte[] expected = clearText.getBytes(US_ASCII_CHARSET); + +ByteArrayOutputStream out = new ByteArrayOutputStream(encoded.length()); +byte[] encodedData = encoded.getBytes(US_ASCII_CHARSET); +Base64Decoder.decode(encodedData, 0, encodedData.length, out); +byte[] actual = out.toByteArray(); + +assertArrayEquals(expected, actual); +} + +} Propchange: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java -- svn:eol-style = native Propchange: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java -- svn:keywords = Date Author Id Revision HeadURL Propchange: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java -- svn:mime-type = text/plain
svn commit: r1458236 - in /commons/proper/fileupload/trunk/src: main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTest
Author: simonetripodi Date: Tue Mar 19 11:56:27 2013 New Revision: 1458236 URL: http://svn.apache.org/r1458236 Log: [FILEUPLOAD-233] fixed and re-enabled the test case where an empty string doesn't need to be decoded Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java?rev=1458236r1=1458235r2=1458236view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java Tue Mar 19 11:56:27 2013 @@ -92,6 +92,10 @@ final class Base64Decoder { byteb1, b2, b3, b4; intoutLen = 0; +if (data.length == 0 || length == 0) { +return outLen; +} + intend = off + length; while (end 0) { Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java?rev=1458236r1=1458235r2=1458236view=diff == --- commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java (original) +++ commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java Tue Mar 19 11:56:27 2013 @@ -45,7 +45,7 @@ public final class Base64DecoderTestCase */ @Test public void rfc4648Section10Decode() throws Exception { -// assertEncoded(, ); +assertEncoded(, ); assertEncoded(f, Zg==); assertEncoded(fo, Zm8=); // assertEncoded(foo, Zm9v);
svn commit: r1458245 - in /commons/proper/fileupload/trunk/src: main/java/org/apache/commons/fileupload/util/mime/ test/java/org/apache/commons/fileupload/util/mime/
Author: simonetripodi Date: Tue Mar 19 12:30:02 2013 New Revision: 1458245 URL: http://svn.apache.org/r1458245 Log: no needs to specify always the offset and the length of the byte[] has to be decoded, since in this implementation there's always the need to decode the whole buffer Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java?rev=1458245r1=1458244r2=1458245view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java Tue Mar 19 12:30:02 2013 @@ -82,21 +82,19 @@ final class Base64Decoder { * whitespace characters will be ignored. * * @param data the buffer containing the Base64-encoded data - * @param off the start offset (zero-based) - * @param length the number of bytes to convert * @param out the output stream to hold the decoded bytes * * @return the number of bytes produced. */ -public static int decode(byte[] data, int off, int length, OutputStream out) throws IOException { +public static int decode(byte[] data, OutputStream out) throws IOException { byteb1, b2, b3, b4; intoutLen = 0; -if (data.length == 0 || length == 0) { +if (data.length == 0) { return outLen; } -intend = off + length; +intend = data.length; while (end 0) { if (!ignore((char) data[end - 1])) { @@ -106,7 +104,7 @@ final class Base64Decoder { end--; } -int i = off; +int i = 0; // CHECKSTYLE IGNORE MagicNumber FOR NEXT 1 LINE int finish = end - 4; // last set of 4 bytes might include padding Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java?rev=1458245r1=1458244r2=1458245view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Tue Mar 19 12:30:02 2013 @@ -243,9 +243,9 @@ public final class MimeUtility { // Base64 encoded? if (encoding.equals(BASE64_ENCODING_MARKER)) { -Base64Decoder.decode(encodedData, 0, encodedData.length, out); +Base64Decoder.decode(encodedData, out); } else if (encoding.equals(QUOTEDPRINTABLE_ENCODING_MARKER)) { // maybe quoted printable. -QuotedPrintableDecoder.decode(encodedData, 0, encodedData.length, out); +QuotedPrintableDecoder.decode(encodedData, out); } else { throw new UnsupportedEncodingException(Unknown RFC 2047 encoding: + encoding); } Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java?rev=1458245r1=1458244r2=1458245view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Tue Mar 19 12:30:02 2013 @@ -63,14 +63,14 @@ final class QuotedPrintableDecoder { * Decode the encoded byte data writing it to the given output stream. * * @param data The array of byte data to decode. - * @param offStarting offset within the array. - * @param length The length of data to encode. * @param outThe output stream used to return the decoded data. * * @return the number of bytes produced
svn commit: r1458266 - /commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java
Author: simonetripodi Date: Tue Mar 19 13:08:50 2013 New Revision: 1458266 URL: http://svn.apache.org/r1458266 Log: added a test where the encoded input string has the padding char in the middle; contrary to commons-codec, it doesn't halt and continues translating Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java?rev=1458266r1=1458265r2=1458266view=diff == Files commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java (original) and commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java Tue Mar 19 13:08:50 2013 differ
svn commit: r1458269 - /commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java
Author: simonetripodi Date: Tue Mar 19 13:22:32 2013 New Revision: 1458269 URL: http://svn.apache.org/r1458269 Log: added a test to see how this Base64 decoder impl behaves compared to https://issues.apache.org/jira/browse/CODEC-68 Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java?rev=1458269r1=1458268r2=1458269view=diff == Files commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java (original) and commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java Tue Mar 19 13:22:32 2013 differ
svn commit: r1458277 - /commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java
Author: simonetripodi Date: Tue Mar 19 13:43:09 2013 New Revision: 1458277 URL: http://svn.apache.org/r1458277 Log: aligned issue documentation reference to @see tag Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java?rev=1458277r1=1458276r2=1458277view=diff == Files commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java (original) and commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/Base64DecoderTestCase.java Tue Mar 19 13:43:09 2013 differ
svn commit: r1458278 - /commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoderTestCase.java
Author: simonetripodi Date: Tue Mar 19 13:44:37 2013 New Revision: 1458278 URL: http://svn.apache.org/r1458278 Log: [FILEUPLOAD-232] initial checkin of QuotedPrintableDecoderTestCase class Added: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoderTestCase.java (with props) Added: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoderTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoderTestCase.java?rev=1458278view=auto == --- commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoderTestCase.java (added) +++ commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoderTestCase.java Tue Mar 19 13:44:37 2013 @@ -0,0 +1,71 @@ +/* + * 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.fileupload.util.mime; + +import static org.junit.Assert.assertArrayEquals; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; + +import org.junit.Test; + +/** + * @since 1.3 + */ +public final class QuotedPrintableDecoderTestCase { + +private static final String US_ASCII_CHARSET = US-ASCII; + +@Test +public void basicEncodeDecode() throws Exception { +assertEncoded(= Hello there =\r\n, =3D Hello there =3D=0D=0A); +} + +@Test(expected = IOException.class) +public void invalidQuotedPrintableEncoding() throws Exception { +assertEncoded(abc123_-.*~!@#$%^()+{}\\\;:`,/[], YWJjMTIzXy0uKn4hQCMkJV4mKCkre31cIlxcOzpgLC9bXQ==); +} + +@Test +public void unsafeDecode() throws Exception { +assertEncoded(=\r\n, =3D=0D=0A); +} + +/** + * This is NOT supported by Commons-Codec, see CODEC-121. + * + * @throws Exception + * @see a href=https://issues.apache.org/jira/browse/CODEC-121;CODEC-121/a + */ +@Test +public void softLineBreakDecode() throws Exception { +assertEncoded(If you believe that truth=beauty, then surely mathematics is the most beautiful branch of philosophy., + If you believe that truth=3Dbeauty, then surely=20=\r\nmathematics is the most beautiful branch of philosophy.); +} + +private static void assertEncoded(String clearText, String encoded) throws Exception { +byte[] expected = clearText.getBytes(US_ASCII_CHARSET); + +ByteArrayOutputStream out = new ByteArrayOutputStream(encoded.length()); +byte[] encodedData = encoded.getBytes(US_ASCII_CHARSET); +QuotedPrintableDecoder.decode(encodedData, out); +byte[] actual = out.toByteArray(); + +assertArrayEquals(expected, actual); +} + +} Propchange: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoderTestCase.java -- svn:eol-style = native Propchange: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoderTestCase.java -- svn:keywords = Date Author Id Revision HeadURL Propchange: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoderTestCase.java -- svn:mime-type = text/plain
svn commit: r1457663 - in /commons/proper/digester/trunk: core/src/test/java/org/apache/commons/digester3/DTDValidationTestCase.java src/changes/changes.xml
Author: simonetripodi Date: Mon Mar 18 07:38:36 2013 New Revision: 1457663 URL: http://svn.apache.org/r1457663 Log: [DIGESTER-173] added a testcase that demonstrates DTD validation suppression - props to Ivan Diana that submitted the patch Modified: commons/proper/digester/trunk/core/src/test/java/org/apache/commons/digester3/DTDValidationTestCase.java commons/proper/digester/trunk/src/changes/changes.xml Modified: commons/proper/digester/trunk/core/src/test/java/org/apache/commons/digester3/DTDValidationTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/core/src/test/java/org/apache/commons/digester3/DTDValidationTestCase.java?rev=1457663r1=1457662r2=1457663view=diff == --- commons/proper/digester/trunk/core/src/test/java/org/apache/commons/digester3/DTDValidationTestCase.java (original) +++ commons/proper/digester/trunk/core/src/test/java/org/apache/commons/digester3/DTDValidationTestCase.java Mon Mar 18 07:38:36 2013 @@ -1,4 +1,4 @@ -/* +/* * 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. @@ -110,4 +110,26 @@ public class DTDValidationTestCase .parse( new File( src/test/resources/org/apache/commons/digester3/document-with-relative-dtd.xml ) ); } +@Test +public void testDigesterLoaderFeatureDisabled() +throws Exception +{ + newLoader( new AbstractRulesModule() +{ + + @Override +protected void configure() +{ +// do nothing +} + +} ) +.setFeature(http://xml.org/sax/features/validation;, false) +.setFeature(http://xml.org/sax/features/external-parameter-entities;, false) + .setFeature(http://apache.org/xml/features/nonvalidating/load-dtd-grammar;, false) + .setFeature(http://apache.org/xml/features/nonvalidating/load-external-dtd;, false) +.newDigester() +.parse( new File( src/test/resources/org/apache/commons/digester3/document-with-relative-dtd-error.xml ) ); +} + } Modified: commons/proper/digester/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/changes/changes.xml?rev=1457663r1=1457662r2=1457663view=diff == --- commons/proper/digester/trunk/src/changes/changes.xml (original) +++ commons/proper/digester/trunk/src/changes/changes.xml Mon Mar 18 07:38:36 2013 @@ -29,8 +29,8 @@ action dev=simonetripodi type=fix issue=DIGESTER-174 due-to=Andreas Sahlbach Inner List Annotation has wrong @Target for most of the predefined annotation rules /action -action dev=simonetripodi type=fix issue=DIGESTER-173 due-to=Ivan Diana - No way to enable schema validation from DigesterLoader +action dev=simonetripodi type=fix issue=DIGESTER-173 due-to=Nick Williams + No way to enable schema validation from DigesterLoader - patch provided by Ivan Diana /action action dev=simonetripodi type=fix issue=DIGESTER-172 due-to=Ivan Diana Even with custom ErrorHandler, SAX errors are still written to stderr
svn commit: r1457665 - in /commons/proper/digester/trunk: core/src/main/java/org/apache/commons/digester3/DefaultThrowingErrorHandler.java core/src/test/java/org/apache/commons/digester3/Digester171Te
Author: simonetripodi Date: Mon Mar 18 07:52:27 2013 New Revision: 1457665 URL: http://svn.apache.org/r1457665 Log: [DIGESTER-171] #comment added a default implementation of ErrorHandlr that simply throws the detected exception - patch provided by Ivan Diana #resolve Added: commons/proper/digester/trunk/core/src/main/java/org/apache/commons/digester3/DefaultThrowingErrorHandler.java (with props) commons/proper/digester/trunk/core/src/test/java/org/apache/commons/digester3/Digester171TestCase.java (with props) Modified: commons/proper/digester/trunk/src/changes/changes.xml Added: commons/proper/digester/trunk/core/src/main/java/org/apache/commons/digester3/DefaultThrowingErrorHandler.java URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/core/src/main/java/org/apache/commons/digester3/DefaultThrowingErrorHandler.java?rev=1457665view=auto == --- commons/proper/digester/trunk/core/src/main/java/org/apache/commons/digester3/DefaultThrowingErrorHandler.java (added) +++ commons/proper/digester/trunk/core/src/main/java/org/apache/commons/digester3/DefaultThrowingErrorHandler.java Mon Mar 18 07:52:27 2013 @@ -0,0 +1,60 @@ +package org.apache.commons.digester3; + +/* + * 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. + */ + +import org.xml.sax.ErrorHandler; +import org.xml.sax.SAXException; +import org.xml.sax.SAXParseException; + +/** + * @since 3.2 + */ +public class DefaultThrowingErrorHandler +implements ErrorHandler +{ + +/** + * {@inheritDoc} + */ +public void warning( SAXParseException e ) +throws SAXException +{ +throw e; +} + +/** + * {@inheritDoc} + */ +public void fatalError( SAXParseException e ) +throws SAXException +{ +throw e; +} + +/** + * {@inheritDoc} + */ +public void error( SAXParseException e ) +throws SAXException +{ +throw e; +} + +} Propchange: commons/proper/digester/trunk/core/src/main/java/org/apache/commons/digester3/DefaultThrowingErrorHandler.java -- svn:eol-style = native Propchange: commons/proper/digester/trunk/core/src/main/java/org/apache/commons/digester3/DefaultThrowingErrorHandler.java -- svn:keywords = Date Author Id Revision HeadURL Propchange: commons/proper/digester/trunk/core/src/main/java/org/apache/commons/digester3/DefaultThrowingErrorHandler.java -- svn:mime-type = text/plain Added: commons/proper/digester/trunk/core/src/test/java/org/apache/commons/digester3/Digester171TestCase.java URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/core/src/test/java/org/apache/commons/digester3/Digester171TestCase.java?rev=1457665view=auto == --- commons/proper/digester/trunk/core/src/test/java/org/apache/commons/digester3/Digester171TestCase.java (added) +++ commons/proper/digester/trunk/core/src/test/java/org/apache/commons/digester3/Digester171TestCase.java Mon Mar 18 07:52:27 2013 @@ -0,0 +1,75 @@ +package org.apache.commons.digester3; + +/* + * 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. + */ + +import
svn commit: r1457666 - /commons/proper/digester/trunk/src/changes/changes.xml
Author: simonetripodi Date: Mon Mar 18 07:53:34 2013 New Revision: 1457666 URL: http://svn.apache.org/r1457666 Log: [DIGESTER-172] issue reported by Nick Williams, patch provided by Ivan Diana Modified: commons/proper/digester/trunk/src/changes/changes.xml Modified: commons/proper/digester/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/digester/trunk/src/changes/changes.xml?rev=1457666r1=1457665r2=1457666view=diff == --- commons/proper/digester/trunk/src/changes/changes.xml (original) +++ commons/proper/digester/trunk/src/changes/changes.xml Mon Mar 18 07:53:34 2013 @@ -32,8 +32,8 @@ action dev=simonetripodi type=fix issue=DIGESTER-173 due-to=Nick Williams No way to enable schema validation from DigesterLoader - patch provided by Ivan Diana /action -action dev=simonetripodi type=fix issue=DIGESTER-172 due-to=Ivan Diana - Even with custom ErrorHandler, SAX errors are still written to stderr +action dev=simonetripodi type=fix issue=DIGESTER-172 due-to=Nick Williams + Even with custom ErrorHandler, SAX errors are still written to stderr - patch provided by Ivan Diana /action action dev=simonetripodi type=fix issue=DIGESTER-171 due-to=Nick Williams Add DefaultThrowingErrorHandler to Digester API - patch provided by Ivan Diana
svn commit: r1457788 - in /commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils: ./ mime/ mime/MimeUtilityTestCase.java
Author: simonetripodi Date: Mon Mar 18 14:56:34 2013 New Revision: 1457788 URL: http://svn.apache.org/r1457788 Log: [FILEUPLOAD-232] started importing MimeUtility test case from http://svn.apache.org/repos/asf/geronimo/specs/tags/geronimo-javamail_1.4_spec-1.4/src/test/java/javax/mail/internet/MimeUtilityTest.java Added: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/ commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/ commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java (with props) Added: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java?rev=1457788view=auto == --- commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java (added) +++ commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java Mon Mar 18 14:56:34 2013 @@ -0,0 +1,42 @@ +/* + * 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.fileupload.utils.mime; + +import static org.junit.Assert.assertEquals; + +import org.apache.commons.fileupload.util.mime.MimeUtility; +import org.junit.Test; + +/** + * @since 1.3 + */ +public final class MimeUtilityTestCase { + +@Test +public void testEncodeText() throws Exception { +assertEncoded(abc, abc); + +assertEncoded( hé! àèôu !!!, =?UTF-8?Q?_h=C3=A9!_=C3=A0=C3=A8=C3=B4u_!!!?=); + +assertEncoded( hé! àèôu !!!, =?UTF-8?B?IGjDqSEgw6DDqMO0dSAhISE=?=); +} + +private static void assertEncoded(String expected, String encoded) throws Exception { +assertEquals(expected, MimeUtility.decodeText(encoded)); +} + +} Propchange: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java -- svn:eol-style = native Propchange: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java -- svn:keywords = Date Author Id Revision HeadURL Propchange: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java -- svn:mime-type = text/plain
svn commit: r1457803 - /commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java
Author: simonetripodi Date: Mon Mar 18 15:17:17 2013 New Revision: 1457803 URL: http://svn.apache.org/r1457803 Log: [FILEUPLOAD-232] test cases granularization, massive test cases make hard to understand which is the failing assertion Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java?rev=1457803r1=1457802r2=1457803view=diff == --- commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java (original) +++ commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java Mon Mar 18 15:17:17 2013 @@ -27,11 +27,17 @@ import org.junit.Test; public final class MimeUtilityTestCase { @Test -public void testEncodeText() throws Exception { +public void noNeedToDecode() throws Exception { assertEncoded(abc, abc); +} +@Test +public void decodeQEncoded() throws Exception { assertEncoded( hé! àèôu !!!, =?UTF-8?Q?_h=C3=A9!_=C3=A0=C3=A8=C3=B4u_!!!?=); +} +@Test +public void decodeBEncoded() throws Exception { assertEncoded( hé! àèôu !!!, =?UTF-8?B?IGjDqSEgw6DDqMO0dSAhISE=?=); }
svn commit: r1457843 - /commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java
Author: simonetripodi Date: Mon Mar 18 16:18:01 2013 New Revision: 1457843 URL: http://svn.apache.org/r1457843 Log: trivial: javadoc comments Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java?rev=1457843r1=1457842r2=1457843view=diff == --- commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java (original) +++ commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java Mon Mar 18 16:18:01 2013 @@ -22,6 +22,9 @@ import org.apache.commons.fileupload.uti import org.junit.Test; /** + * Use the online a href=http://dogmamix.com/MimeHeadersDecoder/;MimeHeadersDecoder/a + * to validate expected values. + * * @since 1.3 */ public final class MimeUtilityTestCase {
svn commit: r1457847 - /commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java
Author: simonetripodi Date: Mon Mar 18 16:31:08 2013 New Revision: 1457847 URL: http://svn.apache.org/r1457847 Log: [FILEUPLOAD-232] added ISO-8859-1?B encoded test, renamed UTF-8 encoded test methods Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java?rev=1457847r1=1457846r2=1457847view=diff == --- commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java (original) +++ commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java Mon Mar 18 16:31:08 2013 @@ -35,15 +35,21 @@ public final class MimeUtilityTestCase { } @Test -public void decodeQEncoded() throws Exception { +public void decodeUtf8QEncoded() throws Exception { assertEncoded( hé! àèôu !!!, =?UTF-8?Q?_h=C3=A9!_=C3=A0=C3=A8=C3=B4u_!!!?=); } @Test -public void decodeBEncoded() throws Exception { +public void decodeUtf8BEncoded() throws Exception { assertEncoded( hé! àèôu !!!, =?UTF-8?B?IGjDqSEgw6DDqMO0dSAhISE=?=); } +@Test +public void decodeIso88591BEncoded() throws Exception { +assertEncoded(If you can read this you understand the example., + =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?= =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=\\r\n); +} + private static void assertEncoded(String expected, String encoded) throws Exception { assertEquals(expected, MimeUtility.decodeText(encoded)); }
svn commit: r1457859 - in /commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload: util/ util/mime/ util/mime/MimeUtilityTestCase.java utils/
Author: simonetripodi Date: Mon Mar 18 16:51:05 2013 New Revision: 1457859 URL: http://svn.apache.org/r1457859 Log: [FILEUPLOAD-232] mime test class relocated in the right util.mime package Added: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/ commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/ - copied from r1457788, commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/ commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/MimeUtilityTestCase.java - copied, changed from r1457847, commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java Removed: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/ Copied: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/MimeUtilityTestCase.java (from r1457847, commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java) URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/MimeUtilityTestCase.java?p2=commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/MimeUtilityTestCase.javap1=commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.javar1=1457847r2=1457859rev=1457859view=diff == --- commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/utils/mime/MimeUtilityTestCase.java (original) +++ commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/MimeUtilityTestCase.java Mon Mar 18 16:51:05 2013 @@ -14,7 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package org.apache.commons.fileupload.utils.mime; +package org.apache.commons.fileupload.util.mime; import static org.junit.Assert.assertEquals;
svn commit: r1457865 - in /commons/proper/fileupload/trunk: ./ src/checkstyle/ src/main/java/org/apache/commons/fileupload/util/mime/
Author: simonetripodi Date: Mon Mar 18 17:05:47 2013 New Revision: 1457865 URL: http://svn.apache.org/r1457865 Log: as discussed in ML, there are MagicNumbers which don't make sense to extract as constant for the sake to make just Checkstyle happy, so MagicNumbers have been reverted - dropped also the constants used only once - and added the related suppressions for interested files Added: commons/proper/fileupload/trunk/src/checkstyle/checkstyle-suppressions.xml (with props) Modified: commons/proper/fileupload/trunk/pom.xml commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Modified: commons/proper/fileupload/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/pom.xml?rev=1457865r1=1457864r2=1457865view=diff == --- commons/proper/fileupload/trunk/pom.xml (original) +++ commons/proper/fileupload/trunk/pom.xml Mon Mar 18 17:05:47 2013 @@ -259,6 +259,7 @@ version2.10/version configuration configLocation${basedir}/src/checkstyle/fileupload_checks.xml/configLocation + suppressionsLocation${basedir}/src/checkstyle/checkstyle-suppressions.xml/suppressionsLocation enableRulesSummaryfalse/enableRulesSummary headerFile${basedir}/src/checkstyle/license-header.txt/headerFile /configuration Added: commons/proper/fileupload/trunk/src/checkstyle/checkstyle-suppressions.xml URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/checkstyle/checkstyle-suppressions.xml?rev=1457865view=auto == --- commons/proper/fileupload/trunk/src/checkstyle/checkstyle-suppressions.xml (added) +++ commons/proper/fileupload/trunk/src/checkstyle/checkstyle-suppressions.xml Mon Mar 18 17:05:47 2013 @@ -0,0 +1,23 @@ +?xml version=1.0? +!DOCTYPE suppressions PUBLIC + -//Puppy Crawl//DTD Suppressions 1.0//EN + http://www.puppycrawl.com/dtds/suppressions_1_0.dtd; +!-- + 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. +-- +suppressions + suppress checks=MagicNumber files=(Base64|QuotedPrintable)Decoder.java lines=0-/ +/suppressions Propchange: commons/proper/fileupload/trunk/src/checkstyle/checkstyle-suppressions.xml -- svn:eol-style = native Propchange: commons/proper/fileupload/trunk/src/checkstyle/checkstyle-suppressions.xml -- svn:keywords = Date Revision Author HeadURL Id Propchange: commons/proper/fileupload/trunk/src/checkstyle/checkstyle-suppressions.xml -- svn:mime-type = text/xml Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java?rev=1457865r1=1457864r2=1457865view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java Mon Mar 18 17:05:47 2013 @@ -25,26 +25,6 @@ import java.io.OutputStream; final class Base64Decoder { /** - * Bytes per undecoded block. - */ -private static final int BYTES_PER_UNENCODED_BLOCK = 3; - -/** - * 2 bits mask. - */ -private static final int MASK_2BITS = 2; - -/** - * 4 bits mask. - */ -private static final int MASK_4BITS = 4; - -/** - * 6 bits mask. - */ -private static final int MASK_6BITS = 6; - -/** * Set up the encoding table. */ private static final byte[] ENCODING_TABLE = { @@ -67,15 +47,10 @@ final class
svn commit: r1457973 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java
Author: simonetripodi Date: Mon Mar 18 20:26:15 2013 New Revision: 1457973 URL: http://svn.apache.org/r1457973 Log: added missing javadoc comment to justify the UnsupportedEncodingException Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java?rev=1457973r1=1457972r2=1457973view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Mon Mar 18 20:26:15 2013 @@ -74,7 +74,7 @@ public final class MimeUtility { * @param text The text to decode. * * @return The decoded test string. - * @throws UnsupportedEncodingException + * @throws UnsupportedEncodingException if the detected encoding in the input text is not supported. */ public static String decodeText(String text) throws UnsupportedEncodingException { // if the text contains any encoded tokens, those tokens will be marked with =?. If the
svn commit: r1457983 - /commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/MimeUtilityTestCase.java
Author: simonetripodi Date: Mon Mar 18 20:47:27 2013 New Revision: 1457983 URL: http://svn.apache.org/r1457983 Log: explicit test methods signatures Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/MimeUtilityTestCase.java Modified: commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/MimeUtilityTestCase.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/MimeUtilityTestCase.java?rev=1457983r1=1457982r2=1457983view=diff == --- commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/MimeUtilityTestCase.java (original) +++ commons/proper/fileupload/trunk/src/test/java/org/apache/commons/fileupload/util/mime/MimeUtilityTestCase.java Mon Mar 18 20:47:27 2013 @@ -35,17 +35,17 @@ public final class MimeUtilityTestCase { } @Test -public void decodeUtf8QEncoded() throws Exception { +public void decodeUtf8QuotedPrintableEncoded() throws Exception { assertEncoded( hé! àèôu !!!, =?UTF-8?Q?_h=C3=A9!_=C3=A0=C3=A8=C3=B4u_!!!?=); } @Test -public void decodeUtf8BEncoded() throws Exception { +public void decodeUtf8Base64Encoded() throws Exception { assertEncoded( hé! àèôu !!!, =?UTF-8?B?IGjDqSEgw6DDqMO0dSAhISE=?=); } @Test -public void decodeIso88591BEncoded() throws Exception { +public void decodeIso88591Base64Encoded() throws Exception { assertEncoded(If you can read this you understand the example., =?ISO-8859-1?B?SWYgeW91IGNhbiByZWFkIHRoaXMgeW8=?= =?ISO-8859-2?B?dSB1bmRlcnN0YW5kIHRoZSBleGFtcGxlLg==?=\\r\n); }
svn commit: r1457989 - /commons/proper/fileupload/trunk/src/checkstyle/checkstyle-suppressions.xml
Author: simonetripodi Date: Mon Mar 18 20:55:56 2013 New Revision: 1457989 URL: http://svn.apache.org/r1457989 Log: checkstyle: exclude *.properties files from check - for some unknown reason (to me, at least) *.properties file were included in the report Modified: commons/proper/fileupload/trunk/src/checkstyle/checkstyle-suppressions.xml Modified: commons/proper/fileupload/trunk/src/checkstyle/checkstyle-suppressions.xml URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/checkstyle/checkstyle-suppressions.xml?rev=1457989r1=1457988r2=1457989view=diff == --- commons/proper/fileupload/trunk/src/checkstyle/checkstyle-suppressions.xml (original) +++ commons/proper/fileupload/trunk/src/checkstyle/checkstyle-suppressions.xml Mon Mar 18 20:55:56 2013 @@ -20,4 +20,5 @@ -- suppressions suppress checks=MagicNumber files=(Base64|QuotedPrintable)Decoder.java lines=0-/ + suppress checks=[a-zA-Z0-9]* files=.+\.properties / /suppressions
svn commit: r1457298 - /commons/proper/chain/trunk/configuration/xml/
Author: simonetripodi Date: Sat Mar 16 19:59:59 2013 New Revision: 1457298 URL: http://svn.apache.org/r1457298 Log: trivial: updated ignore list Modified: commons/proper/chain/trunk/configuration/xml/ (props changed) Propchange: commons/proper/chain/trunk/configuration/xml/ -- --- svn:ignore (original) +++ svn:ignore Sat Mar 16 19:59:59 2013 @@ -1 +1,2 @@ target +.settings
svn commit: r1457300 - in /commons/proper/chain/trunk: pom.xml src/changes/changes.xml
Author: simonetripodi Date: Sat Mar 16 20:03:18 2013 New Revision: 1457300 URL: http://svn.apache.org/r1457300 Log: [CHAIN-78] #comment updated to parent 28, props to Steve Westwood #resolve Modified: commons/proper/chain/trunk/pom.xml commons/proper/chain/trunk/src/changes/changes.xml Modified: commons/proper/chain/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/pom.xml?rev=1457300r1=1457299r2=1457300view=diff == --- commons/proper/chain/trunk/pom.xml (original) +++ commons/proper/chain/trunk/pom.xml Sat Mar 16 20:03:18 2013 @@ -23,7 +23,7 @@ parent groupIdorg.apache.commons/groupId artifactIdcommons-parent/artifactId -version25/version +version28/version /parent groupIdorg.apache.commons/groupId Modified: commons/proper/chain/trunk/src/changes/changes.xml URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/src/changes/changes.xml?rev=1457300r1=1457299r2=1457300view=diff == --- commons/proper/chain/trunk/src/changes/changes.xml (original) +++ commons/proper/chain/trunk/src/changes/changes.xml Sat Mar 16 20:03:18 2013 @@ -41,6 +41,9 @@ The action type attribute can be add,u body release version=2.0 description=Major release + action issue=CHAIN-78 dev=simonetripodi type=update due-to=Steve Westwood +Move to a more recent version of commons-parent POM + /action action issue=CHAIN-75 dev=elijah type=update Update serialVersionUID in all classes to a date based format. /action
svn commit: r1456801 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java
Author: simonetripodi Date: Fri Mar 15 08:42:40 2013 New Revision: 1456801 URL: http://svn.apache.org/r1456801 Log: trivial: original source link in package-info already Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java?rev=1456801r1=1456800r2=1456801view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Fri Mar 15 08:42:40 2013 @@ -26,8 +26,6 @@ import java.util.Map; /** * Utility class to decode MIME texts. * - * Imported and retailed from a href=http://svn.apache.org/repos/asf/geronimo/specs/tags/geronimo-javamail_1.4_spec-1.4/src/main/java/javax/mail/internet/MimeUtility.java;Apache Geronimo/a - * * @since 1.3 */ public final class MimeUtility {
svn commit: r1456803 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java
Author: simonetripodi Date: Fri Mar 15 08:45:28 2013 New Revision: 1456803 URL: http://svn.apache.org/r1456803 Log: checkstyle: Missing a Javadoc comment Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java?rev=1456803r1=1456802r2=1456803view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Fri Mar 15 08:45:28 2013 @@ -30,10 +30,19 @@ import java.util.Map; */ public final class MimeUtility { +/** + * The linear whitespace chars sequence. + */ private static final String LINEAR_WHITESPACE = \t\r\n; +/** + * Mappings between MIME and Java charset. + */ private static final MapString, String MIME2JAVA = new HashMapString, String(); +/** + * The Base64 decoder. + */ private static final Base64Decoder BASE64_DECODER = new Base64Decoder(); static {
svn commit: r1456804 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java
Author: simonetripodi Date: Fri Mar 15 08:47:53 2013 New Revision: 1456804 URL: http://svn.apache.org/r1456804 Log: checkstyle: Expected @throws tag Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java?rev=1456804r1=1456803r2=1456804view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Fri Mar 15 08:47:53 2013 @@ -74,7 +74,7 @@ public final class MimeUtility { * @param text The text to decode. * * @return The decoded test string. - * @exception UnsupportedEncodingException + * @throws UnsupportedEncodingException */ public static String decodeText(String text) throws UnsupportedEncodingException { // if the text contains any encoded tokens, those tokens will be marked with =?. If the @@ -178,8 +178,8 @@ public final class MimeUtility { * @param word The possibly encoded word value. * * @return The decoded word. - * @exception ParseException - * @exception UnsupportedEncodingException + * @throws ParseException + * @throws UnsupportedEncodingException */ private static String decodeWord(String word) throws ParseException, UnsupportedEncodingException { // encoded words start with the characters =?. If this not an encoded word, we throw a
svn commit: r1456809 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/FileUploadBase.java
Author: simonetripodi Date: Fri Mar 15 08:56:13 2013 New Revision: 1456809 URL: http://svn.apache.org/r1456809 Log: PMD: These nested if statements could be combined Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/FileUploadBase.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/FileUploadBase.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/FileUploadBase.java?rev=1456809r1=1456808r2=1456809view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/FileUploadBase.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/FileUploadBase.java Fri Mar 15 08:56:13 2013 @@ -959,13 +959,11 @@ public abstract class FileUploadBase { : ctx.getContentLength(); if (sizeMax = 0) { -if (requestSize != -1) { -if (requestSize sizeMax) { -throw new SizeLimitExceededException( -format(the request was rejected because its size (%s) exceeds the configured maximum (%s), - requestSize, sizeMax), - requestSize, sizeMax); -} +if (requestSize != -1 requestSize sizeMax) { +throw new SizeLimitExceededException( +format(the request was rejected because its size (%s) exceeds the configured maximum (%s), + requestSize, sizeMax), + requestSize, sizeMax); } input = new LimitedInputStream(input, sizeMax) { @Override
svn commit: r1456814 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java
Author: simonetripodi Date: Fri Mar 15 09:01:15 2013 New Revision: 1456814 URL: http://svn.apache.org/r1456814 Log: PMD: These nested if statements could be combined Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java?rev=1456814r1=1456813r2=1456814view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Fri Mar 15 09:01:15 2013 @@ -137,11 +137,9 @@ public final class MimeUtility { String decodedWord = decodeWord(word); // are any whitespace characters significant? Append 'em if we've got 'em. -if (!previousTokenEncoded) { -if (startWhiteSpace != -1) { - decodedText.append(text.substring(startWhiteSpace, endWhiteSpace)); -startWhiteSpace = -1; -} +if (!previousTokenEncoded startWhiteSpace != -1) { +decodedText.append(text.substring(startWhiteSpace, endWhiteSpace)); +startWhiteSpace = -1; } // this is definitely a decoded token. previousTokenEncoded = true;
svn commit: r1456819 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java
Author: simonetripodi Date: Fri Mar 15 09:13:39 2013 New Revision: 1456819 URL: http://svn.apache.org/r1456819 Log: checkstyle: '}' should be on the same line. Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java?rev=1456819r1=1456818r2=1456819view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Fri Mar 15 09:13:39 2013 @@ -104,8 +104,7 @@ public final class MimeUtility { ch = text.charAt(offset); if (LINEAR_WHITESPACE.indexOf(ch) != -1) { offset++; -} -else { +} else { // record the location of the first non lwsp and drop down to process the // token characters. endWhiteSpace = offset; @@ -121,8 +120,7 @@ public final class MimeUtility { ch = text.charAt(offset); if (LINEAR_WHITESPACE.indexOf(ch) == -1) { offset++; -} -else { +} else { break; }
svn commit: r1456820 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java
Author: simonetripodi Date: Fri Mar 15 09:15:18 2013 New Revision: 1456820 URL: http://svn.apache.org/r1456820 Log: trivial: added comment on empty catch block Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java?rev=1456820r1=1456819r2=1456820view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Fri Mar 15 09:15:18 2013 @@ -148,6 +148,7 @@ public final class MimeUtility { continue; } catch (ParseException e) { +// just ignore it, skip to next word } } // this is a normal token, so it doesn't matter what the previous token was. Add the white space
svn commit: r1456821 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java
Author: simonetripodi Date: Fri Mar 15 09:17:28 2013 New Revision: 1456821 URL: http://svn.apache.org/r1456821 Log: checkstyle: Avoid inline conditionals. Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java?rev=1456821r1=1456820r2=1456821view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Fri Mar 15 09:17:28 2013 @@ -255,7 +255,10 @@ public final class MimeUtility { String mappedCharset = MIME2JAVA.get(charset.toLowerCase(Locale.ENGLISH)); // if there is no mapping, then the original name is used. Many of the MIME character set // names map directly back into Java. The reverse isn't necessarily true. -return mappedCharset == null ? charset : mappedCharset; +if (mappedCharset == null) { +return charset; +} +return mappedCharset; } }
svn commit: r1456824 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/ParseException.java
Author: simonetripodi Date: Fri Mar 15 09:19:35 2013 New Revision: 1456824 URL: http://svn.apache.org/r1456824 Log: checkstyle: Missing a Javadoc comment. Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/ParseException.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/ParseException.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/ParseException.java?rev=1456824r1=1456823r2=1456824view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/ParseException.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/ParseException.java Fri Mar 15 09:19:35 2013 @@ -22,10 +22,15 @@ package org.apache.commons.fileupload.ut public final class ParseException extends Exception { /** - * + * The UID to use when serializing this instance. */ private static final long serialVersionUID = 5355281266579392077L; +/** + * Constructs a new exception with the specified detail message. + * + * @param message the detail message. + */ public ParseException(String message) { super(message); }
svn commit: r1456825 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/ParseException.java
Author: simonetripodi Date: Fri Mar 15 09:22:22 2013 New Revision: 1456825 URL: http://svn.apache.org/r1456825 Log: trivial: no need to expose ParseException outside the mime package, since it is used internally only Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/ParseException.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/ParseException.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/ParseException.java?rev=1456825r1=1456824r2=1456825view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/ParseException.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/ParseException.java Fri Mar 15 09:22:22 2013 @@ -19,7 +19,7 @@ package org.apache.commons.fileupload.ut /** * @since 1.3 */ -public final class ParseException extends Exception { +final class ParseException extends Exception { /** * The UID to use when serializing this instance.
svn commit: r1456827 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java
Author: simonetripodi Date: Fri Mar 15 09:25:11 2013 New Revision: 1456827 URL: http://svn.apache.org/r1456827 Log: checkstyle: 'protected' modifier out of order with the JLS suggestions. internal data structures made private, no reasons to be protected Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java?rev=1456827r1=1456826r2=1456827view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Fri Mar 15 09:25:11 2013 @@ -27,7 +27,7 @@ final class QuotedPrintableDecoder { /** * set up the encoding table. */ -static protected final byte[] ENCODING_TABLE = +private static final byte[] ENCODING_TABLE = { (byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5', (byte)'6', (byte)'7', (byte)'8', (byte)'9', (byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F' @@ -36,7 +36,7 @@ final class QuotedPrintableDecoder { /** * set up the decoding table. */ -static protected final byte[] DECODING_TABLE = new byte[128]; +private static final byte[] DECODING_TABLE = new byte[128]; static { // initialize the decoding table
svn commit: r1456828 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java
Author: simonetripodi Date: Fri Mar 15 09:26:30 2013 New Revision: 1456828 URL: http://svn.apache.org/r1456828 Log: checkstyle: 'cast' is not followed by whitespace. Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java?rev=1456828r1=1456827r2=1456828view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Fri Mar 15 09:26:30 2013 @@ -29,8 +29,8 @@ final class QuotedPrintableDecoder { */ private static final byte[] ENCODING_TABLE = { -(byte)'0', (byte)'1', (byte)'2', (byte)'3', (byte)'4', (byte)'5', (byte)'6', (byte)'7', -(byte)'8', (byte)'9', (byte)'A', (byte)'B', (byte)'C', (byte)'D', (byte)'E', (byte)'F' +(byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', +(byte) '8', (byte) '9', (byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F' }; /** @@ -41,7 +41,7 @@ final class QuotedPrintableDecoder { static { // initialize the decoding table for (int i = 0; i ENCODING_TABLE.length; i++) { -DECODING_TABLE[ENCODING_TABLE[i]] = (byte)i; +DECODING_TABLE[ENCODING_TABLE[i]] = (byte) i; } }
svn commit: r1456829 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java
Author: simonetripodi Date: Fri Mar 15 09:27:34 2013 New Revision: 1456829 URL: http://svn.apache.org/r1456829 Log: checkstyle: 'private' modifier out of order with the JLS suggestions. Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java?rev=1456829r1=1456828r2=1456829view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Fri Mar 15 09:27:34 2013 @@ -46,7 +46,7 @@ final class QuotedPrintableDecoder { } // default number of characters we will write per line. -static private final int DEFAULT_CHARS_PER_LINE = 76; +private static final int DEFAULT_CHARS_PER_LINE = 76; // the output stream we're wrapped around protected OutputStream out;
svn commit: r1456832 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java
Author: simonetripodi Date: Fri Mar 15 09:29:30 2013 New Revision: 1456832 URL: http://svn.apache.org/r1456832 Log: checkstyle: Missing a Javadoc comment. Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java?rev=1456832r1=1456831r2=1456832view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Fri Mar 15 09:29:30 2013 @@ -45,30 +45,49 @@ final class QuotedPrintableDecoder { } } -// default number of characters we will write per line. +/** + * default number of characters we will write per line. + */ private static final int DEFAULT_CHARS_PER_LINE = 76; -// the output stream we're wrapped around +/** + * the output stream we're wrapped around + */ protected OutputStream out; -// the number of bytes written; +/** + * the number of bytes written; + */ protected int bytesWritten = 0; -// number of bytes written on the current line +/** + * number of bytes written on the current line + */ protected int lineCount = 0; -// line length we're dealing with +/** + * line length we're dealing with + */ protected int lineLength; -// number of deferred whitespace characters in decode mode. +/** + * number of deferred whitespace characters in decode mode. + */ protected int deferredWhitespace = 0; +/** + * internal parsed character cache. + */ protected int cachedCharacter = -1; -// indicates whether the last character was a '\r', potentially part of a CRLF sequence. +/** + * indicates whether the last character was a '\r', potentially part of a CRLF sequence. + */ protected boolean lastCR = false; -// remember whether last character was a white space. +/** + * remember whether last character was a white space. + */ protected boolean lastWhitespace = false; public QuotedPrintableDecoder() {
svn commit: r1456834 - in /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime: MimeUtility.java QuotedPrintableDecoder.java
Author: simonetripodi Date: Fri Mar 15 09:36:35 2013 New Revision: 1456834 URL: http://svn.apache.org/r1456834 Log: dropped unused variables, decode() method made static Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java?rev=1456834r1=1456833r2=1456834view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Fri Mar 15 09:36:35 2013 @@ -225,8 +225,7 @@ public final class MimeUtility { if (encoding.equals(B)) { BASE64_DECODER.decode(encodedData, 0, encodedData.length, out); } else if (encoding.equals(Q)) { // maybe quoted printable. -QuotedPrintableDecoder dataEncoder = new QuotedPrintableDecoder(); -dataEncoder.decodeWord(encodedData, 0, encodedData.length, out); +QuotedPrintableDecoder.decodeWord(encodedData, 0, encodedData.length, out); } else { throw new UnsupportedEncodingException(Unknown RFC 2047 encoding: + encoding); } Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java?rev=1456834r1=1456833r2=1456834view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Fri Mar 15 09:36:35 2013 @@ -46,64 +46,6 @@ final class QuotedPrintableDecoder { } /** - * default number of characters we will write per line. - */ -private static final int DEFAULT_CHARS_PER_LINE = 76; - -/** - * the output stream we're wrapped around - */ -protected OutputStream out; - -/** - * the number of bytes written; - */ -protected int bytesWritten = 0; - -/** - * number of bytes written on the current line - */ -protected int lineCount = 0; - -/** - * line length we're dealing with - */ -protected int lineLength; - -/** - * number of deferred whitespace characters in decode mode. - */ -protected int deferredWhitespace = 0; - -/** - * internal parsed character cache. - */ -protected int cachedCharacter = -1; - -/** - * indicates whether the last character was a '\r', potentially part of a CRLF sequence. - */ -protected boolean lastCR = false; - -/** - * remember whether last character was a white space. - */ -protected boolean lastWhitespace = false; - -public QuotedPrintableDecoder() { -this(null, DEFAULT_CHARS_PER_LINE); -} - -public QuotedPrintableDecoder(OutputStream out) { -this(out, DEFAULT_CHARS_PER_LINE); -} - -public QuotedPrintableDecoder(OutputStream out, int lineLength) { -this.out = out; -this.lineLength = lineLength; -} - -/** * decode the uuencoded byte data writing it to the given output stream * * @param data The array of byte data to decode. @@ -114,10 +56,7 @@ final class QuotedPrintableDecoder { * @return the number of bytes produced. * @exception IOException */ -public int decodeWord(byte[] data, int off, int length, OutputStream out) throws IOException { -// make sure we're writing to the correct stream -this.out = out; - +public static int decodeWord(byte[] data, int off, int length, OutputStream out) throws IOException { int endOffset = off + length; int bytesWritten = 0;
svn commit: r1456837 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java
Author: simonetripodi Date: Fri Mar 15 09:40:38 2013 New Revision: 1456837 URL: http://svn.apache.org/r1456837 Log: checkstyle: Utility classes should not have a public or default constructor Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java?rev=1456837r1=1456836r2=1456837view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Fri Mar 15 09:40:38 2013 @@ -46,6 +46,13 @@ final class QuotedPrintableDecoder { } /** + * Hidden constructor, this class must not be instantiated. + */ +private QuotedPrintableDecoder() { +// do nothing +} + +/** * decode the uuencoded byte data writing it to the given output stream * * @param data The array of byte data to decode.
svn commit: r1456838 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java
Author: simonetripodi Date: Fri Mar 15 09:42:02 2013 New Revision: 1456838 URL: http://svn.apache.org/r1456838 Log: checkstyle: First sentence should end with a period. Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java?rev=1456838r1=1456837r2=1456838view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Fri Mar 15 09:42:02 2013 @@ -53,7 +53,7 @@ final class QuotedPrintableDecoder { } /** - * decode the uuencoded byte data writing it to the given output stream + * decode the uuencoded byte data writing it to the given output stream. * * @param data The array of byte data to decode. * @param offStarting offset within the array.
svn commit: r1456843 - in /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime: Base64Decoder.java MimeUtility.java
Author: simonetripodi Date: Fri Mar 15 09:49:34 2013 New Revision: 1456843 URL: http://svn.apache.org/r1456843 Log: minor Base64Decoder refactoring to reflect QuotedPrintableDecoder structure Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java?rev=1456843r1=1456842r2=1456843view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java Fri Mar 15 09:49:34 2013 @@ -24,7 +24,7 @@ import java.io.OutputStream; */ final class Base64Decoder { -private final byte[] encodingTable = { +private static final byte[] ENCODING_TABLE = { (byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F', (byte) 'G', (byte) 'H', (byte) 'I', (byte) 'J', (byte) 'K', (byte) 'L', (byte) 'M', (byte) 'N', (byte) 'O', (byte) 'P', (byte) 'Q', (byte) 'R', (byte) 'S', (byte) 'T', (byte) 'U', @@ -39,24 +39,24 @@ final class Base64Decoder { (byte) '+', (byte) '/' }; -private byte padding = (byte) '='; +private static final byte PADDING = (byte) '='; /* * set up the decoding table. */ -private final byte[] decodingTable = new byte[256]; +private static final byte[] DECODING_TABLE = new byte[256]; -protected void initialiseDecodingTable() { -for (int i = 0; i encodingTable.length; i++) { -decodingTable[encodingTable[i]] = (byte) i; +static { +for (int i = 0; i ENCODING_TABLE.length; i++) { +DECODING_TABLE[ENCODING_TABLE[i]] = (byte) i; } } -public Base64Decoder() { -initialiseDecodingTable(); +private Base64Decoder() { +// do nothing } -private boolean ignore( +private static boolean ignore( charc) { return (c == '\n' || c == '\r' || c == '\t' || c == ' '); } @@ -67,7 +67,7 @@ final class Base64Decoder { * * @return the number of bytes produced. */ -public int decode( +public static int decode( byte[]data, intoff, intlength, @@ -94,25 +94,25 @@ final class Base64Decoder { i++; } -b1 = decodingTable[data[i++]]; +b1 = DECODING_TABLE[data[i++]]; while ((i finish) ignore((char) data[i])) { i++; } -b2 = decodingTable[data[i++]]; +b2 = DECODING_TABLE[data[i++]]; while ((i finish) ignore((char) data[i])) { i++; } -b3 = decodingTable[data[i++]]; +b3 = DECODING_TABLE[data[i++]]; while ((i finish) ignore((char) data[i])) { i++; } -b4 = decodingTable[data[i++]]; +b4 = DECODING_TABLE[data[i++]]; out.write((b1 2) | (b2 4)); out.write((b2 4) | (b3 2)); @@ -121,27 +121,27 @@ final class Base64Decoder { outLen += 3; } -if (data[end - 2] == padding) { -b1 = decodingTable[data[end - 4]]; -b2 = decodingTable[data[end - 3]]; +if (data[end - 2] == PADDING) { +b1 = DECODING_TABLE[data[end - 4]]; +b2 = DECODING_TABLE[data[end - 3]]; out.write((b1 2) | (b2 4)); outLen += 1; -} else if (data[end - 1] == padding) { -b1 = decodingTable[data[end - 4]]; -b2 = decodingTable[data[end - 3]]; -b3 = decodingTable[data[end - 2]]; +} else if (data[end - 1] == PADDING) { +b1 = DECODING_TABLE[data[end - 4]]; +b2 = DECODING_TABLE[data[end - 3]]; +b3 = DECODING_TABLE[data[end - 2]]; out.write((b1 2) | (b2 4)); out.write((b2 4) | (b3 2)); outLen += 2; } else { -b1 = decodingTable[data[end - 4]]; -b2 = decodingTable[data[end - 3]]; -b3 = decodingTable[data[end - 2]]; -b4 = decodingTable[data[end - 1]]; +b1 = DECODING_TABLE[data[end - 4]]; +b2 = DECODING_TABLE[data[end - 3]]; +b3 = DECODING_TABLE[data[end - 2]]; +b4 = DECODING_TABLE[data[end - 1]]; out.write((b1 2) | (b2 4
svn commit: r1456850 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java
Author: simonetripodi Date: Fri Mar 15 09:53:09 2013 New Revision: 1456850 URL: http://svn.apache.org/r1456850 Log: checkstyle: Missing a Javadoc comment Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java?rev=1456850r1=1456849r2=1456850view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java Fri Mar 15 09:53:09 2013 @@ -24,6 +24,9 @@ import java.io.OutputStream; */ final class Base64Decoder { +/** + * set up the encoding table. + */ private static final byte[] ENCODING_TABLE = { (byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F', (byte) 'G', (byte) 'H', (byte) 'I', (byte) 'J', (byte) 'K', (byte) 'L', (byte) 'M', (byte) 'N', @@ -39,9 +42,12 @@ final class Base64Decoder { (byte) '+', (byte) '/' }; +/** + * The padding byte. + */ private static final byte PADDING = (byte) '='; -/* +/** * set up the decoding table. */ private static final byte[] DECODING_TABLE = new byte[256]; @@ -52,10 +58,19 @@ final class Base64Decoder { } } +/** + * Hidden constructor, this class must not be instantiated. + */ private Base64Decoder() { // do nothing } +/** + * Checks if the input char must be skipped from the decode. + * + * @param c the char has to be checked. + * @return true, if the input char has to be checked, false otherwise. + */ private static boolean ignore( charc) { return (c == '\n' || c == '\r' || c == '\t' || c == ' ');
svn commit: r1456852 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java
Author: simonetripodi Date: Fri Mar 15 10:02:37 2013 New Revision: 1456852 URL: http://svn.apache.org/r1456852 Log: checkstyle: '128' is a magic number. Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java?rev=1456852r1=1456851r2=1456852view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Fri Mar 15 10:02:37 2013 @@ -34,9 +34,14 @@ final class QuotedPrintableDecoder { }; /** + * the decoding table size. + */ +private static final int DECODING_TABLE_SIZE = 128; + +/** * set up the decoding table. */ -private static final byte[] DECODING_TABLE = new byte[128]; +private static final byte[] DECODING_TABLE = new byte[DECODING_TABLE_SIZE]; static { // initialize the decoding table
svn commit: r1456857 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java
Author: simonetripodi Date: Fri Mar 15 10:11:09 2013 New Revision: 1456857 URL: http://svn.apache.org/r1456857 Log: checkstyle: '4' is a magic number. Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java?rev=1456857r1=1456856r2=1456857view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Fri Mar 15 10:11:09 2013 @@ -34,6 +34,11 @@ final class QuotedPrintableDecoder { }; /** + * The default number of byte shift for decode. + */ +private static final int OUT_SHIFT = 4; + +/** * the decoding table size. */ private static final int DECODING_TABLE_SIZE = 128; @@ -99,7 +104,7 @@ final class QuotedPrintableDecoder { // this is a hex pair we need to convert back to a single byte. byte c1 = DECODING_TABLE[b1]; byte c2 = DECODING_TABLE[b2]; -out.write((c1 4) | c2); +out.write((c1 OUT_SHIFT) | c2); // 3 bytes in, one byte out bytesWritten++; }
svn commit: r1456862 - /commons/proper/fileupload/trunk/pom.xml
Author: simonetripodi Date: Fri Mar 15 10:17:47 2013 New Revision: 1456862 URL: http://svn.apache.org/r1456862 Log: excluded org.apache.commons.fileupload.util.mime package from OSGi export - props to Felix Meshberger for pointing it Modified: commons/proper/fileupload/trunk/pom.xml Modified: commons/proper/fileupload/trunk/pom.xml URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/pom.xml?rev=1456862r1=1456861r2=1456862view=diff == --- commons/proper/fileupload/trunk/pom.xml (original) +++ commons/proper/fileupload/trunk/pom.xml Fri Mar 15 10:17:47 2013 @@ -182,6 +182,7 @@ commons.rc.versionRC2/commons.rc.version commons.jira.idFILEUPLOAD/commons.jira.id commons.jira.pid12310476/commons.jira.pid + commons.osgi.export!org.apache.commons.fileupload.util.mime,org.apache.commons.*;version=${project.version};-noimport:=true/commons.osgi.export commons.osgi.import!javax.portlet,*/commons.osgi.import commons.osgi.dynamicImportjavax.portlet/commons.osgi.dynamicImport /properties
svn commit: r1456871 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java
Author: simonetripodi Date: Fri Mar 15 10:37:01 2013 New Revision: 1456871 URL: http://svn.apache.org/r1456871 Log: checkstyle: '256' is a magic number. Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java?rev=1456871r1=1456870r2=1456871view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/Base64Decoder.java Fri Mar 15 10:37:01 2013 @@ -48,9 +48,14 @@ final class Base64Decoder { private static final byte PADDING = (byte) '='; /** + * the decoding table size. + */ +private static final int DECODING_TABLE_SIZE = 256; + +/** * set up the decoding table. */ -private static final byte[] DECODING_TABLE = new byte[256]; +private static final byte[] DECODING_TABLE = new byte[DECODING_TABLE_SIZE]; static { for (int i = 0; i ENCODING_TABLE.length; i++) {
svn commit: r1456873 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java
Author: simonetripodi Date: Fri Mar 15 10:38:11 2013 New Revision: 1456873 URL: http://svn.apache.org/r1456873 Log: trivial: code format Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java?rev=1456873r1=1456872r2=1456873view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/QuotedPrintableDecoder.java Fri Mar 15 10:38:11 2013 @@ -27,8 +27,7 @@ final class QuotedPrintableDecoder { /** * set up the encoding table. */ -private static final byte[] ENCODING_TABLE = -{ +private static final byte[] ENCODING_TABLE = { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'A', (byte) 'B', (byte) 'C', (byte) 'D', (byte) 'E', (byte) 'F' };
svn commit: r1456973 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java
Author: simonetripodi Date: Fri Mar 15 14:53:48 2013 New Revision: 1456973 URL: http://svn.apache.org/r1456973 Log: trivial: use StringBuilder in place of StringBuffer Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java?rev=1456973r1=1456972r2=1456973view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Fri Mar 15 14:53:48 2013 @@ -84,7 +84,7 @@ public final class MimeUtility { int startWhiteSpace = -1; int endWhiteSpace = -1; -StringBuffer decodedText = new StringBuffer(text.length()); +StringBuilder decodedText = new StringBuilder(text.length()); boolean previousTokenEncoded = false;
svn commit: r1456977 - /commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java
Author: simonetripodi Date: Fri Mar 15 14:56:20 2013 New Revision: 1456977 URL: http://svn.apache.org/r1456977 Log: trivial: extracted constants Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Modified: commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java URL: http://svn.apache.org/viewvc/commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java?rev=1456977r1=1456976r2=1456977view=diff == --- commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java (original) +++ commons/proper/fileupload/trunk/src/main/java/org/apache/commons/fileupload/util/mime/MimeUtility.java Fri Mar 15 14:56:20 2013 @@ -31,6 +31,11 @@ import java.util.Map; public final class MimeUtility { /** + * If the text contains any encoded tokens, those tokens will be marked with =? + */ +private static final String ENCODED_TOKEN_MARKER = =?; + +/** * The linear whitespace chars sequence. */ private static final String LINEAR_WHITESPACE = \t\r\n; @@ -74,7 +79,7 @@ public final class MimeUtility { public static String decodeText(String text) throws UnsupportedEncodingException { // if the text contains any encoded tokens, those tokens will be marked with =?. If the // source string doesn't contain that sequent, no decoding is required. -if (text.indexOf(=?) 0) { +if (text.indexOf(ENCODED_TOKEN_MARKER) 0) { return text; } @@ -124,7 +129,7 @@ public final class MimeUtility { // pull out the word token. String word = text.substring(wordStart, offset); // is the token encoded? decode the word -if (word.startsWith(=?)) { +if (word.startsWith(ENCODED_TOKEN_MARKER)) { try { // if this gives a parsing failure, treat it like a non-encoded word. String decodedWord = decodeWord(word); @@ -177,7 +182,7 @@ public final class MimeUtility { // encoded words start with the characters =?. If this not an encoded word, we throw a // ParseException for the caller. -if (!word.startsWith(=?)) { +if (!word.startsWith(ENCODED_TOKEN_MARKER)) { throw new ParseException(Invalid RFC 2047 encoded-word: + word); }