Re: [digester] implementation of String-Date for xs:dateTime

2008-05-20 Thread Christopher Schultz

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sebb,

sebb wrote:
|  Here is the implementation that I developed [for an xs:dateTime
converter]. Oddly,
|  it seems that sometimes the TimeZone is incorrectly set (though the
|  normalized time appears to be correct) in the resulting Date. Any tips
|  would be appreciated.
|
|  Apologies for the poor formatting.
|
|
| Could you please create a JIRA enhancement issue and attach the code
there?

Certainly. Should I log it against digester (where it is most useful) or
beanutils (where all the stock Converters actually live)?

- -chris

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkgy39EACgkQ9CaO5/Lv0PDeJQCeMPA722p+XE8TeOl+jHD8Rn6w
k00AniC00o2x2g1i0LsG00b/kUUcMJqp
=G/yZ
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [digester] implementation of String-Date for xs:dateTime

2008-05-20 Thread [EMAIL PROTECTED]
Christopher Schultz schrieb:
 Sebb,

 sebb wrote:
 |  Here is the implementation that I developed [for an xs:dateTime
 converter]. Oddly,
 |  it seems that sometimes the TimeZone is incorrectly set (though the
 |  normalized time appears to be correct) in the resulting Date. Any tips
 |  would be appreciated.
 |
 |  Apologies for the poor formatting.
 |
 |
 | Could you please create a JIRA enhancement issue and attach the code
 there?

 Certainly. Should I log it against digester (where it is most useful) or
 beanutils (where all the stock Converters actually live)?

Not against Digester please. Digester doesn't do any data conversion
itself, just invokes BeanUtils.

BeanUtils seems the appropriate place for this.

Regards, Simon


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[cli2] Negative number arguments seen as options

2008-05-20 Thread Roland Roberts
I just discovered that an option that takes an argument can't provide a 
negative value, --value -2 is seen as option value followed by option 
2.  This is true even if I use NumberValidator; I tried that thinking 
it might provide a hint to the parser.


259 roland cd commons-cli-2.0
260 roland svn up
At revision 658435.


roland

--
   PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD RL Enterprises
[EMAIL PROTECTED]6818 Madeline Court
[EMAIL PROTECTED]   Brooklyn, NY 11220


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [cli2] Negative number arguments seen as options

2008-05-20 Thread James Carman
Can you quote it?

On Tue, May 20, 2008 at 5:12 PM, Roland Roberts [EMAIL PROTECTED] wrote:
 I just discovered that an option that takes an argument can't provide a
 negative value, --value -2 is seen as option value followed by option 2.
  This is true even if I use NumberValidator; I tried that thinking it might
 provide a hint to the parser.

 259 roland cd commons-cli-2.0
 260 roland svn up
 At revision 658435.


 roland

 --
   PGP Key ID: 66 BC 3B CD
 Roland B. Roberts, PhD RL Enterprises
 [EMAIL PROTECTED]6818 Madeline Court
 [EMAIL PROTECTED]   Brooklyn, NY 11220


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [cli2] Negative number arguments seen as options

2008-05-20 Thread Roland Roberts

James Carman wrote:

Can you quote it?
  

No.  If I do

foo --value  -2

it works but then 'new Integer( -2) throws NumberException; it 
doesn't like leading spaces.  I can work around that to provide some way 
to get in negative values, but it just looks like a bug to me.  
Particularly since I specified .withMinimum(1) for the argument, so the 
parser *has* to know there is an argument there.


roland

--
   PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD RL Enterprises
[EMAIL PROTECTED]6818 Madeline Court
[EMAIL PROTECTED]   Brooklyn, NY 11220


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [cli2] Negative number arguments seen as options

2008-05-20 Thread James Carman
Why the leading space inside the quote?

On Tue, May 20, 2008 at 5:51 PM, Roland Roberts [EMAIL PROTECTED] wrote:
 James Carman wrote:

 Can you quote it?


 No.  If I do

 foo --value  -2

 it works but then 'new Integer( -2) throws NumberException; it doesn't
 like leading spaces.  I can work around that to provide some way to get in
 negative values, but it just looks like a bug to me.  Particularly since I
 specified .withMinimum(1) for the argument, so the parser *has* to know
 there is an argument there.

 roland

 --
   PGP Key ID: 66 BC 3B CD
 Roland B. Roberts, PhD RL Enterprises
 [EMAIL PROTECTED]6818 Madeline Court
 [EMAIL PROTECTED]   Brooklyn, NY 11220


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [cli2] Negative number arguments seen as options

2008-05-20 Thread James Carman
What type of parser are you using?

On Tue, May 20, 2008 at 10:51 PM, Roland Roberts [EMAIL PROTECTED] wrote:
 James Carman wrote:

 Why the leading space inside the quote?


 The first part of the answer was and is NO.  Quoting does not help.  Single
 quotes, double quotes, backslashes, nada, nothing, zip, zilch, no effect.

 The second part of the answer was IF I DO and put the quote at the
 beginning, then the parser does not consider it to be an option, but it
 fails to convert to an integer.

 Quoting doesn't help.

 roland

 On Tue, May 20, 2008 at 5:51 PM, Roland Roberts [EMAIL PROTECTED]
 wrote:


 James Carman wrote:


 Can you quote it?


 No.  If I do

 foo --value  -2

 it works but then 'new Integer( -2) throws NumberException; it
 doesn't
 like leading spaces.

 --
   PGP Key ID: 66 BC 3B CD
 Roland B. Roberts, PhD RL Enterprises
 [EMAIL PROTECTED]6818 Madeline Court
 [EMAIL PROTECTED]   Brooklyn, NY 11220


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]