svn commit: r647116 - in /commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/src/java/org/apache/commons/collections: ./ comparators/ iterators/ map/
Author: niallp Date: Fri Apr 11 04:23:08 2008 New Revision: 647116 URL: http://svn.apache.org/viewvc?rev=647116&view=rev Log: Remove tab characters Modified: commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/src/java/org/apache/commons/collections/CursorableLinkedList.java commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/src/java/org/apache/commons/collections/PredicateUtils.java commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/src/java/org/apache/commons/collections/comparators/NullComparator.java commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/src/java/org/apache/commons/collections/iterators/ArrayIterator.java commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/src/java/org/apache/commons/collections/iterators/ArrayListIterator.java commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/src/java/org/apache/commons/collections/iterators/IteratorChain.java commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/src/java/org/apache/commons/collections/iterators/ObjectArrayListIterator.java commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/src/java/org/apache/commons/collections/iterators/ObjectGraphIterator.java commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/src/java/org/apache/commons/collections/iterators/SingletonIterator.java commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/src/java/org/apache/commons/collections/map/CompositeMap.java Modified: commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/src/java/org/apache/commons/collections/CursorableLinkedList.java URL: http://svn.apache.org/viewvc/commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/src/java/org/apache/commons/collections/CursorableLinkedList.java?rev=647116&r1=647115&r2=647116&view=diff == --- commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/src/java/org/apache/commons/collections/CursorableLinkedList.java (original) +++ commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/src/java/org/apache/commons/collections/CursorableLinkedList.java Fri Apr 11 04:23:08 2008 @@ -78,11 +78,11 @@ * @param element element to be inserted. * * @throws ClassCastException if the class of the specified element - * prevents it from being added to this list. + * prevents it from being added to this list. * @throws IllegalArgumentException if some aspect of the specified - * element prevents it from being added to this list. + * element prevents it from being added to this list. * @throws IndexOutOfBoundsException if the index is out of range - * (index < 0 || index > size()). + * (index < 0 || index > size()). */ public void add(int index, Object element) { if(index == _size) { @@ -109,7 +109,7 @@ * @return true if this list changed as a result of the call. * * @throws ClassCastException if the class of an element in the specified - * collection prevents it from being added to this list. + * collection prevents it from being added to this list. * @throws IllegalArgumentException if some aspect of an element in the * specified collection prevents it from being added to this * list. @@ -137,18 +137,18 @@ * collection is this list, and it's nonempty.) * * @param index index at which to insert first element from the specified - * collection. + *collection. * @param c elements to be inserted into this list. * @return true if this list changed as a result of the call. * * @throws ClassCastException if the class of one of elements of the - *specified collection prevents it from being added to this - *list. + *specified collection prevents it from being added to this + *list. * @throws IllegalArgumentException if some aspect of one of elements of * the specified collection prevents it from being added to * this list. * @throws IndexOutOfBoundsException if the index is out of range (index - * < 0 || index > size()). + * < 0 || index > size()). */ public boolean addAll(int index, Collection c) { if(c.isEmpty()) { @@ -291,7 +291,7 @@ * @see #listIterator(int) * @see CursorableLinkedList.Cursor * @throws IndexOutOfBoundsException if the index is out of range (index - * < 0 || index > size()). + *< 0 || index > size()). */ public CursorableLinkedList.Cursor cursor(int i) { return new Cursor(i); @@ -333,7 +333,7 @@ * @return the element at the specified position in this list. * * @
svn commit: r647155 - /commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/checkstyle.xml
Author: niallp Date: Fri Apr 11 06:13:23 2008 New Revision: 647155 URL: http://svn.apache.org/viewvc?rev=647155&view=rev Log: copy in checkstyle Added: commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/checkstyle.xml - copied unchanged from r645221, commons/proper/collections/trunk/checkstyle.xml
svn commit: r647160 - in /commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH: src/site/site.xml xdocs/history.xml
Author: niallp Date: Fri Apr 11 06:29:08 2008 New Revision: 647160 URL: http://svn.apache.org/viewvc?rev=647160&view=rev Log: Minor site changes Modified: commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/src/site/site.xml commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/xdocs/history.xml Modified: commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/src/site/site.xml URL: http://svn.apache.org/viewvc/commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/src/site/site.xml?rev=647160&r1=647159&r2=647160&view=diff == --- commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/src/site/site.xml (original) +++ commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/src/site/site.xml Fri Apr 11 06:29:08 2008 @@ -28,7 +28,7 @@ http://commons.apache.org/downloads/download_collections.cgi"/> - + Modified: commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/xdocs/history.xml URL: http://svn.apache.org/viewvc/commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/xdocs/history.xml?rev=647160&r1=647159&r2=647160&view=diff == --- commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/xdocs/history.xml (original) +++ commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/xdocs/history.xml Fri Apr 11 06:29:08 2008 @@ -101,7 +101,7 @@ -Collections 3.2.1 Re-packaged release of v3.2 which is OSGi enabled. +Collections 3.2.1 Re-packaged v3.2 release which is OSGi enabled.
svn commit: r647180 - /commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/maven.xml
Author: niallp Date: Fri Apr 11 07:29:05 2008 New Revision: 647180 URL: http://svn.apache.org/viewvc?rev=647180&view=rev Log: m1 build corrections Modified: commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/maven.xml Modified: commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/maven.xml URL: http://svn.apache.org/viewvc/commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/maven.xml?rev=647180&r1=647179&r2=647180&view=diff == --- commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/maven.xml (original) +++ commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/maven.xml Fri Apr 11 07:29:05 2008 @@ -75,6 +75,7 @@ + @@ -110,13 +111,6 @@ - - - - - - -
svn commit: r647183 - /commons/proper/collections/tags/COLLECTIONS_3_2_1_RC1/
Author: niallp Date: Fri Apr 11 07:32:00 2008 New Revision: 647183 URL: http://svn.apache.org/viewvc?rev=647183&view=rev Log: Tag Collections 3.2.1 RC1 Added: commons/proper/collections/tags/COLLECTIONS_3_2_1_RC1/ - copied from r647182, commons/proper/collections/branches/COLLECTIONS_3_2_BRANCH/
svn commit: r647216 - /commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/util/StringUtils.java
Author: sebb Date: Fri Apr 11 09:31:08 2008 New Revision: 647216 URL: http://svn.apache.org/viewvc?rev=647216&view=rev Log: Add String split() method (needed for VMS code) Modified: commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/util/StringUtils.java Modified: commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/util/StringUtils.java URL: http://svn.apache.org/viewvc/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/util/StringUtils.java?rev=647216&r1=647215&r2=647216&view=diff == --- commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/util/StringUtils.java (original) +++ commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/util/StringUtils.java Fri Apr 11 09:31:08 2008 @@ -19,7 +19,10 @@ package org.apache.commons.exec.util; +import java.util.ArrayList; +import java.util.List; import java.util.Map; +import java.util.StringTokenizer; /** * Supplement of commons-lang, the stringSubstitution() was in a simpler @@ -127,4 +130,19 @@ return argBuf; } -} + + /** + * Split a string into an array of strings + * @param input what to split + * @param splitChar what to split on + * @return the array of strings + */ + public static String[] split(String input, String splitChar){ + StringTokenizer tokens = new StringTokenizer(input, splitChar); + List strList=new ArrayList(); + while (tokens.hasMoreTokens()) { + strList.add(tokens.nextToken()); + } + return (String[])strList.toArray(new String[0]); + } +} \ No newline at end of file
svn commit: r647217 - in /commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec: CommandLine.java launcher/VmsCommandLauncher.java
Author: sebb Date: Fri Apr 11 09:37:11 2008 New Revision: 647217 URL: http://svn.apache.org/viewvc?rev=647217&view=rev Log: Fix nested VMS script handling (hopefully) Modified: commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/VmsCommandLauncher.java Modified: commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java URL: http://svn.apache.org/viewvc/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java?rev=647217&r1=647216&r2=647217&view=diff == --- commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java (original) +++ commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/CommandLine.java Fri Apr 11 09:37:11 2008 @@ -51,6 +51,8 @@ */ private Map substitutionMap; +private final boolean isFile; + /** * Create a command line from a string. * @@ -99,6 +101,7 @@ * @param executable the executable */ public CommandLine(String executable) { +this.isFile=false; setExecutable(executable); } @@ -108,6 +111,7 @@ * @param executable the executable */ public CommandLine(File executable) { +this.isFile=true; setExecutable(executable.getAbsolutePath()); } @@ -118,6 +122,10 @@ */ public String getExecutable() { return this.expandArgument(executable); +} + +public boolean isFile(){ +return isFile; } /** Modified: commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/VmsCommandLauncher.java URL: http://svn.apache.org/viewvc/commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/VmsCommandLauncher.java?rev=647217&r1=647216&r2=647217&view=diff == --- commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/VmsCommandLauncher.java (original) +++ commons/sandbox/exec/trunk/src/main/java/org/apache/commons/exec/launcher/VmsCommandLauncher.java Fri Apr 11 09:37:11 2008 @@ -28,6 +28,7 @@ import java.util.Set; import org.apache.commons.exec.CommandLine; +import org.apache.commons.exec.util.StringUtils; /** * A command launcher for VMS that writes the command to a temporary DCL script @@ -89,7 +90,25 @@ } } -out.print("$ " + cmd.getExecutable()); +final String command = cmd.getExecutable(); +if (cmd.isFile()){// We assume it is it a script file +out.print("$ @"); +// This is a bit crude, but seems to work +String parts[] = StringUtils.split(command,"/"); +out.print(parts[0]); // device +out.print(":["); +out.print(parts[1]); // top level directory +final int lastPart = parts.length-1; +for(int i=2; i< lastPart; i++){ +out.print("."); +out.print(parts[i]); +} +out.print("]"); +out.print(parts[lastPart]); +} else { +out.print("$ "); +out.print(command); +} String[] args = cmd.getArguments(); for (int i = 0; i < args.length; i++) { out.println(" -");
svn commit: r647218 - /commons/sandbox/exec/trunk/src/test/scripts/error.dcl
Author: sebb Date: Fri Apr 11 09:37:57 2008 New Revision: 647218 URL: http://svn.apache.org/viewvc?rev=647218&view=rev Log: Ensure error exit does not print a message Modified: commons/sandbox/exec/trunk/src/test/scripts/error.dcl Modified: commons/sandbox/exec/trunk/src/test/scripts/error.dcl URL: http://svn.apache.org/viewvc/commons/sandbox/exec/trunk/src/test/scripts/error.dcl?rev=647218&r1=647217&r2=647218&view=diff == --- commons/sandbox/exec/trunk/src/test/scripts/error.dcl (original) +++ commons/sandbox/exec/trunk/src/test/scripts/error.dcl Fri Apr 11 09:37:57 2008 @@ -22,4 +22,4 @@ $ ENV_VAR=f$trnlnm("TEST_ENV_VAR") $ write sys$output "FOO.''ENV_VAR'.''P1'" $! -$ exit 2 ! this is an Error \ No newline at end of file +$ exit %x1002 ! this is an Error, but does not print a message \ No newline at end of file
svn commit: r647290 - /commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/
Author: mbenson Date: Fri Apr 11 13:08:44 2008 New Revision: 647290 URL: http://svn.apache.org/viewvc?rev=647290&view=rev Log: [SANDBOX-224] functor parent interface(s) Added: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/BinaryFunctor.java (with props) commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/Functor.java (with props) commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/NullaryFunctor.java (with props) commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/UnaryFunctor.java (with props) Modified: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/BinaryFunction.java commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/BinaryPredicate.java commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/BinaryProcedure.java commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/Function.java commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/Predicate.java commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/Procedure.java commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/UnaryFunction.java commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/UnaryPredicate.java commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/UnaryProcedure.java Modified: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/BinaryFunction.java URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/BinaryFunction.java?rev=647290&r1=647289&r2=647290&view=diff == --- commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/BinaryFunction.java (original) +++ commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/BinaryFunction.java Fri Apr 11 13:08:44 2008 @@ -26,7 +26,7 @@ * @version $Revision$ $Date$ * @author Rodney Waldhoff */ -public interface BinaryFunction { +public interface BinaryFunction extends BinaryFunctor { /** * Evaluate this function. * @@ -35,49 +35,4 @@ * @return the result of this function for the given arguments */ Object evaluate(Object left, Object right); - -/** - * Returns a human readable description of this functor. - * Implementators are strongly encouraged but not - * strictly required to override the default [EMAIL PROTECTED] Object} - * implementation of this method. - * - * @return a human readable description of this functor - */ -String toString(); - -/** - * Returns a hash code for this functor adhering to the - * general [EMAIL PROTECTED] Object#hashCode Object.hashCode} contract. - * Implementators are strongly encouraged but not - * strictly required to override the default [EMAIL PROTECTED] Object} - * implementation of this method. - * - * @see #equals - * @return a hash code for this functor - */ -int hashCode(); - -/** - * Indicates whether some other object is "equal to" - * this functor. This method must adhere to - * general [EMAIL PROTECTED] Object#equals Object.equals} contract. - * Additionally, this method can return - * true only if the specified Object implements - * the same functor interface and is known to produce the same - * results and/or side-effects for the same arguments (if any). - * - * While implementators are strongly encouraged to override - * the default Object implementation of this method, - * note that the default Object implementation - * does in fact adhere to the functor equals contract. - * - * @param that the object to compare this functor to - * @see #hashCode - * @return true iff the given object implements - * this functor interface, and is known to produce the same - * results and/or side-effects for the same arguments - * (if any). - */ -boolean equals(Object that); } Added: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/BinaryFunctor.java URL: http://svn.apache.org/viewvc/commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/BinaryFunctor.java?rev=647290&view=auto == --- commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/BinaryFunctor.java (added) +++ commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/BinaryFunctor.java Fri Apr 11 13:08:44 2008 @@ -0,0 +1,30 @@ +/* + * 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 ownersh
svn commit: r647297 - in /commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor: BinaryFunctor.java Functor.java NullaryFunctor.java UnaryFunctor.java
Author: mbenson Date: Fri Apr 11 13:14:50 2008 New Revision: 647297 URL: http://svn.apache.org/viewvc?rev=647297&view=rev Log: keywords Modified: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/BinaryFunctor.java (props changed) commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/Functor.java (props changed) commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/NullaryFunctor.java (props changed) commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/UnaryFunctor.java (props changed) Propchange: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/BinaryFunctor.java -- --- svn:keywords (added) +++ svn:keywords Fri Apr 11 13:14:50 2008 @@ -0,0 +1,5 @@ +Date +Author +Id +Revision +HeadURL Propchange: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/Functor.java -- --- svn:keywords (added) +++ svn:keywords Fri Apr 11 13:14:50 2008 @@ -0,0 +1,5 @@ +Date +Author +Id +Revision +HeadURL Propchange: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/NullaryFunctor.java -- --- svn:keywords (added) +++ svn:keywords Fri Apr 11 13:14:50 2008 @@ -0,0 +1,5 @@ +Date +Author +Id +Revision +HeadURL Propchange: commons/sandbox/functor/trunk/src/main/java/org/apache/commons/functor/UnaryFunctor.java -- --- svn:keywords (added) +++ svn:keywords Fri Apr 11 13:14:50 2008 @@ -0,0 +1,5 @@ +Date +Author +Id +Revision +HeadURL