You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Henning P. Schmiedehausen" <hp...@intermeta.de> on 2007/08/01 14:47:56 UTC
[CLI] Make methods in cli 1.x Parser visible
Why is processArgs() in Parser.java public and all the others are
private? (ATM I have an application where it would be good to
intercept the option processing in a subclass).
Anyone mind if I put in the following patch (uh, do I still have
commit rights? I had in jakarta...)?
BTW: The build file on the cli-1.x branch still says "1.1". I could
fix that, too.
Best regards
Henning
Index: src/java/org/apache/commons/cli/Parser.java
===================================================================
--- src/java/org/apache/commons/cli/Parser.java (revision 561786)
+++ src/java/org/apache/commons/cli/Parser.java (working copy)
@@ -233,7 +233,7 @@
*
* @param properties The value properties to be processed.
*/
- private void processProperties(Properties properties)
+ protected void processProperties(Properties properties)
{
if (properties == null)
{
@@ -287,7 +287,7 @@
* @throws MissingOptionException if any of the required Options
* are not present.
*/
- private void checkRequiredOptions()
+ protected void checkRequiredOptions()
throws MissingOptionException
{
// if there are required options that have not been
@@ -368,7 +368,7 @@
* @throws ParseException if <code>arg</code> does not
* represent an Option
*/
- private void processOption(String arg, ListIterator iter)
+ protected void processOption(String arg, ListIterator iter)
throws ParseException
{
boolean hasOption = options.hasOption(arg);
Best regards
Henning
--
Henning P. Schmiedehausen -- hps@intermeta.de | J2EE, Linux, |gls
91054 Buckenhof, Germany -- +49 9131 506540 | Apache person |eau
Open Source Consulting, Development, Design | Velocity - Turbine guy |rwc
|m k
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH - RG Fuerth, HRB 7350 |a s
Sitz der Gesellschaft: Buckenhof. Geschaeftsfuehrer: Henning Schmiedehausen |n
"Save the cheerleader. Save the world."
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [CLI] Make methods in cli 1.x Parser visible
Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
"Niall Pemberton" <ni...@gmail.com> writes:
Sure. Will open issues.
Best regards
Henning
>On 8/1/07, Henning P. Schmiedehausen <hp...@intermeta.de> wrote:
>> Why is processArgs() in Parser.java public and all the others are
>> private? (ATM I have an application where it would be good to
>> intercept the option processing in a subclass).
>>
>> Anyone mind if I put in the following patch (uh, do I still have
>> commit rights? I had in jakarta...)?
>You should stiil have committ access - we took over anyone who had
>committed in the last 2 years and you were on the list.
>Henri Yandell and Brian Egge did most of the work on the recent CLI
>1.1 release - so would be good to give them a few days to comment
>before committing your proposed changes. If you don't get a response
>after that then I would go ahead.
>Could you create Jira tickets for your changes anyway - makes life
>easier trackng changes by version and creating release notes:
>http://commons.apache.org/cli/issue-tracking.html
>Niall
>> BTW: The build file on the cli-1.x branch still says "1.1". I could
>> fix that, too.
>>
>> Best regards
>> Henning
>>
>>
>> Index: src/java/org/apache/commons/cli/Parser.java
>> ===================================================================
>> --- src/java/org/apache/commons/cli/Parser.java (revision 561786)
>> +++ src/java/org/apache/commons/cli/Parser.java (working copy)
>> @@ -233,7 +233,7 @@
>> *
>> * @param properties The value properties to be processed.
>> */
>> - private void processProperties(Properties properties)
>> + protected void processProperties(Properties properties)
>> {
>> if (properties == null)
>> {
>> @@ -287,7 +287,7 @@
>> * @throws MissingOptionException if any of the required Options
>> * are not present.
>> */
>> - private void checkRequiredOptions()
>> + protected void checkRequiredOptions()
>> throws MissingOptionException
>> {
>> // if there are required options that have not been
>> @@ -368,7 +368,7 @@
>> * @throws ParseException if <code>arg</code> does not
>> * represent an Option
>> */
>> - private void processOption(String arg, ListIterator iter)
>> + protected void processOption(String arg, ListIterator iter)
>> throws ParseException
>> {
>> boolean hasOption = options.hasOption(arg);
>>
>>
>> Best regards
>> Henning
>> --
>> Henning P. Schmiedehausen -- hps@intermeta.de | J2EE, Linux, |gls
>> 91054 Buckenhof, Germany -- +49 9131 506540 | Apache person |eau
>> Open Source Consulting, Development, Design | Velocity - Turbine guy |rwc
>> |m k
>> INTERMETA - Gesellschaft fuer Mehrwertdienste mbH - RG Fuerth, HRB 7350 |a s
>> Sitz der Gesellschaft: Buckenhof. Geschaeftsfuehrer: Henning Schmiedehausen |n
>>
>> "Save the cheerleader. Save the world."
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>> For additional commands, e-mail: dev-help@commons.apache.org
>>
>>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
>For additional commands, e-mail: dev-help@commons.apache.org
--
Henning P. Schmiedehausen -- hps@intermeta.de | J2EE, Linux, |gls
91054 Buckenhof, Germany -- +49 9131 506540 | Apache person |eau
Open Source Consulting, Development, Design | Velocity - Turbine guy |rwc
|m k
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH - RG Fuerth, HRB 7350 |a s
Sitz der Gesellschaft: Buckenhof. Geschaeftsfuehrer: Henning Schmiedehausen |n
"Save the cheerleader. Save the world."
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: [CLI] Make methods in cli 1.x Parser visible
Posted by Niall Pemberton <ni...@gmail.com>.
On 8/1/07, Henning P. Schmiedehausen <hp...@intermeta.de> wrote:
> Why is processArgs() in Parser.java public and all the others are
> private? (ATM I have an application where it would be good to
> intercept the option processing in a subclass).
>
> Anyone mind if I put in the following patch (uh, do I still have
> commit rights? I had in jakarta...)?
You should stiil have committ access - we took over anyone who had
committed in the last 2 years and you were on the list.
Henri Yandell and Brian Egge did most of the work on the recent CLI
1.1 release - so would be good to give them a few days to comment
before committing your proposed changes. If you don't get a response
after that then I would go ahead.
Could you create Jira tickets for your changes anyway - makes life
easier trackng changes by version and creating release notes:
http://commons.apache.org/cli/issue-tracking.html
Niall
> BTW: The build file on the cli-1.x branch still says "1.1". I could
> fix that, too.
>
> Best regards
> Henning
>
>
> Index: src/java/org/apache/commons/cli/Parser.java
> ===================================================================
> --- src/java/org/apache/commons/cli/Parser.java (revision 561786)
> +++ src/java/org/apache/commons/cli/Parser.java (working copy)
> @@ -233,7 +233,7 @@
> *
> * @param properties The value properties to be processed.
> */
> - private void processProperties(Properties properties)
> + protected void processProperties(Properties properties)
> {
> if (properties == null)
> {
> @@ -287,7 +287,7 @@
> * @throws MissingOptionException if any of the required Options
> * are not present.
> */
> - private void checkRequiredOptions()
> + protected void checkRequiredOptions()
> throws MissingOptionException
> {
> // if there are required options that have not been
> @@ -368,7 +368,7 @@
> * @throws ParseException if <code>arg</code> does not
> * represent an Option
> */
> - private void processOption(String arg, ListIterator iter)
> + protected void processOption(String arg, ListIterator iter)
> throws ParseException
> {
> boolean hasOption = options.hasOption(arg);
>
>
> Best regards
> Henning
> --
> Henning P. Schmiedehausen -- hps@intermeta.de | J2EE, Linux, |gls
> 91054 Buckenhof, Germany -- +49 9131 506540 | Apache person |eau
> Open Source Consulting, Development, Design | Velocity - Turbine guy |rwc
> |m k
> INTERMETA - Gesellschaft fuer Mehrwertdienste mbH - RG Fuerth, HRB 7350 |a s
> Sitz der Gesellschaft: Buckenhof. Geschaeftsfuehrer: Henning Schmiedehausen |n
>
> "Save the cheerleader. Save the world."
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org