commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1544827 - in /commons/proper/cli/trunk: RELEASE-NOTES.txt pom.xml src/changes/changes.xml src/main/java/org/apache/commons/cli/Option.java
Date Sat, 23 Nov 2013 16:16:54 GMT
Author: tn
Date: Sat Nov 23 16:16:54 2013
New Revision: 1544827

URL: http://svn.apache.org/r1544827
Log:
[CLI-234] Fixed javadoc example of Option.Builder.valueSeparator(char). Thanks to Greg Thomas.

Modified:
    commons/proper/cli/trunk/RELEASE-NOTES.txt
    commons/proper/cli/trunk/pom.xml
    commons/proper/cli/trunk/src/changes/changes.xml
    commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Option.java

Modified: commons/proper/cli/trunk/RELEASE-NOTES.txt
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/RELEASE-NOTES.txt?rev=1544827&r1=1544826&r2=1544827&view=diff
==============================================================================
--- commons/proper/cli/trunk/RELEASE-NOTES.txt (original)
+++ commons/proper/cli/trunk/RELEASE-NOTES.txt Sat Nov 23 16:16:54 2013
@@ -36,6 +36,8 @@ NEW FEATURES:
 
 BUG FIXES:
 
+  * Fixed code example in javadoc of "Option#Builder#valueSeparator(char)". Thanks to Greg
Thomas. (CLI-234)
+
   * Clarified behavior of "OptionValidator#validateOption(String)" in case of null input.
Thanks to Beluga Behr. (CLI-241)
 
   * Default options will now work correctly with required options that are missing. (CLI-202)

Modified: commons/proper/cli/trunk/pom.xml
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/pom.xml?rev=1544827&r1=1544826&r2=1544827&view=diff
==============================================================================
--- commons/proper/cli/trunk/pom.xml (original)
+++ commons/proper/cli/trunk/pom.xml Sat Nov 23 16:16:54 2013
@@ -85,10 +85,18 @@
       <email>ebourg@apache.org</email>
       <organization>Ariane Software</organization>
     </developer>
+    <developer>
+      <name>Thomas Neidhart</name>
+      <id>tn</id>
+      <email>tn@apache.org</email>
+    </developer>
   </developers>
 
   <contributors>
     <contributor>
+      <name>Beluga Behr</name>
+    </contributor>
+    <contributor>
       <name>Peter Donald</name>
       <roles>
         <role>contributed ideas and code from Avalon Excalibur's cli package</role>
@@ -134,6 +142,9 @@
       </roles>
     </contributor>
     <contributor>
+      <name>Greg Thomas</name>
+    </contributor>
+    <contributor>
       <name>Slawek Zachcial</name>
       <roles>
         <role>unit tests</role>

Modified: commons/proper/cli/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/changes/changes.xml?rev=1544827&r1=1544826&r2=1544827&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/changes/changes.xml (original)
+++ commons/proper/cli/trunk/src/changes/changes.xml Sat Nov 23 16:16:54 2013
@@ -23,6 +23,9 @@
   <body>
     
     <release version="1.3" date="in SVN" description="This is a maintenance release containing
bug fixes.">
+      <action type="fix" dev="tn" issue="CLI-234" due-to="Greg Thomas">
+        Fixed code example in javadoc of "Option#Builder#valueSeparator(char)".
+      </action>
       <action type="fix" dev="tn" issue="CLI-241" due-to="Beluga Behr">
         Clarified behavior of "OptionValidator#validateOption(String)" in case of null input.
       </action>

Modified: commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Option.java
URL: http://svn.apache.org/viewvc/commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Option.java?rev=1544827&r1=1544826&r2=1544827&view=diff
==============================================================================
--- commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Option.java (original)
+++ commons/proper/cli/trunk/src/main/java/org/apache/commons/cli/Option.java Sat Nov 23 16:16:54
2013
@@ -933,13 +933,16 @@ public class Option implements Cloneable
          * <p>
          * <b>Example:</b>
          * <pre>
-         * Option opt = Option.builder("D").valueSeparator('=')
+         * Option opt = Option.builder("D").hasArgs()
+         *                                 .valueSeparator('=')
          *                                 .build();
-         *
-         * String args = "-Dkey=value";
-         * CommandLine line = parser.parse(args);
-         * String propertyName = opt.getValue(0);  // will be "key"
-         * String propertyValue = opt.getValue(1); // will be "value"
+         * Options options = new Options();
+         * options.addOption(opt);
+         * String[] args = {"-Dkey=value"};
+         * CommandLineParser parser = new DefaultParser();
+         * CommandLine line = parser.parse(options, args);
+         * String propertyName = line.getOptionValues("D")[0];  // will be "key"
+         * String propertyValue = line.getOptionValues("D")[1]; // will be "value"
          * </pre>
          *
          * @param sep The value separator.



Mime
View raw message