[jira] [Commented] (WICKET-4580) StringValue: missing methods to convert from text to wrapped classes of primitive type with defaultValue

2015-02-10 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-4580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14315687#comment-14315687
 ] 

ASF GitHub Bot commented on WICKET-4580:


Github user klopfdreh commented on the pull request:

https://github.com/apache/wicket/pull/13#issuecomment-73840576
  
As of the JIRA ticket this topic wouldn't be fixed - @minman would you be 
so kind and close this PR? Thank you.


> StringValue: missing methods to convert from text to wrapped classes of 
> primitive type with defaultValue
> 
>
> Key: WICKET-4580
> URL: https://issues.apache.org/jira/browse/WICKET-4580
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 1.5.6
>Reporter: manthos
>
> org.apache.wicket.util.string.StringValue has methods to convert from String 
> to a specific type with a defaultValue if text is empty or inconvertible.
> example: 
> public final long toLong(final long defaultValue)
> Missing equivalent methods working with wrapped classes of primitive type. 
> New methods:
> toBooleanObject(final Boolean defaultValue)
> toCharacter(final Character defaultValue)
> toDoubleObject(final Double defaultValue)
> toInteger(final Integer defaultValue)
> toLongObject(final Long defaultValue)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WICKET-4580) StringValue: missing methods to convert from text to wrapped classes of primitive type with defaultValue

2015-02-10 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-4580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14315711#comment-14315711
 ] 

ASF GitHub Bot commented on WICKET-4580:


Github user minman closed the pull request at:

https://github.com/apache/wicket/pull/13


> StringValue: missing methods to convert from text to wrapped classes of 
> primitive type with defaultValue
> 
>
> Key: WICKET-4580
> URL: https://issues.apache.org/jira/browse/WICKET-4580
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 1.5.6
>Reporter: manthos
>
> org.apache.wicket.util.string.StringValue has methods to convert from String 
> to a specific type with a defaultValue if text is empty or inconvertible.
> example: 
> public final long toLong(final long defaultValue)
> Missing equivalent methods working with wrapped classes of primitive type. 
> New methods:
> toBooleanObject(final Boolean defaultValue)
> toCharacter(final Character defaultValue)
> toDoubleObject(final Double defaultValue)
> toInteger(final Integer defaultValue)
> toLongObject(final Long defaultValue)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (WICKET-4580) StringValue: missing methods to convert from text to wrapped classes of primitive type with defaultValue

2012-06-01 Thread Martin Grigorov (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-4580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287279#comment-13287279
 ] 

Martin Grigorov commented on WICKET-4580:
-

public final long toLong(final long defaultValue) 
vs.
toLongObject(final Long defaultValue) 

Java (un)boxing will do this automatically for you, no ?

> StringValue: missing methods to convert from text to wrapped classes of 
> primitive type with defaultValue
> 
>
> Key: WICKET-4580
> URL: https://issues.apache.org/jira/browse/WICKET-4580
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 1.5.6
>Reporter: manthos
>
> org.apache.wicket.util.string.StringValue has methods to convert from String 
> to a specific type with a defaultValue if text is empty or inconvertible.
> example: 
> public final long toLong(final long defaultValue)
> Missing equivalent methods working with wrapped classes of primitive type. 
> New methods:
> toBooleanObject(final Boolean defaultValue)
> toCharacter(final Character defaultValue)
> toDoubleObject(final Double defaultValue)
> toInteger(final Integer defaultValue)
> toLongObject(final Long defaultValue)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (WICKET-4580) StringValue: missing methods to convert from text to wrapped classes of primitive type with defaultValue

2012-06-01 Thread manthos (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-4580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287287#comment-13287287
 ] 

manthos commented on WICKET-4580:
-

Not possible if you want null as defaultValue.

if (stringValue.toLongObject(null) == null) {
  // ask user for value
}

The 'toOptionalLong' won't do the same because it still throws a 
StringValueConversionException if text is inconvertible.

I've added a pull request https://github.com/apache/wicket/pull/13

> StringValue: missing methods to convert from text to wrapped classes of 
> primitive type with defaultValue
> 
>
> Key: WICKET-4580
> URL: https://issues.apache.org/jira/browse/WICKET-4580
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 1.5.6
>Reporter: manthos
>
> org.apache.wicket.util.string.StringValue has methods to convert from String 
> to a specific type with a defaultValue if text is empty or inconvertible.
> example: 
> public final long toLong(final long defaultValue)
> Missing equivalent methods working with wrapped classes of primitive type. 
> New methods:
> toBooleanObject(final Boolean defaultValue)
> toCharacter(final Character defaultValue)
> toDoubleObject(final Double defaultValue)
> toInteger(final Integer defaultValue)
> toLongObject(final Long defaultValue)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (WICKET-4580) StringValue: missing methods to convert from text to wrapped classes of primitive type with defaultValue

2012-06-01 Thread Martin Grigorov (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-4580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287293#comment-13287293
 ] 

Martin Grigorov commented on WICKET-4580:
-

I don't like this.
This class has too many methods even now. I got confused every time I need to 
use any of these methods.

> StringValue: missing methods to convert from text to wrapped classes of 
> primitive type with defaultValue
> 
>
> Key: WICKET-4580
> URL: https://issues.apache.org/jira/browse/WICKET-4580
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 1.5.6
>Reporter: manthos
>
> org.apache.wicket.util.string.StringValue has methods to convert from String 
> to a specific type with a defaultValue if text is empty or inconvertible.
> example: 
> public final long toLong(final long defaultValue)
> Missing equivalent methods working with wrapped classes of primitive type. 
> New methods:
> toBooleanObject(final Boolean defaultValue)
> toCharacter(final Character defaultValue)
> toDoubleObject(final Double defaultValue)
> toInteger(final Integer defaultValue)
> toLongObject(final Long defaultValue)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (WICKET-4580) StringValue: missing methods to convert from text to wrapped classes of primitive type with defaultValue

2012-06-01 Thread manthos (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-4580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13287300#comment-13287300
 ] 

manthos commented on WICKET-4580:
-

I agree there are many methods. I'm still +1 to add the missing ones. All 
supported types have also methods with a fallback to a defaultValue; all  
except the wrapped classes of primitive types. So why not? I don't see any 
reason to not include this too.

 


> StringValue: missing methods to convert from text to wrapped classes of 
> primitive type with defaultValue
> 
>
> Key: WICKET-4580
> URL: https://issues.apache.org/jira/browse/WICKET-4580
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 1.5.6
>Reporter: manthos
>
> org.apache.wicket.util.string.StringValue has methods to convert from String 
> to a specific type with a defaultValue if text is empty or inconvertible.
> example: 
> public final long toLong(final long defaultValue)
> Missing equivalent methods working with wrapped classes of primitive type. 
> New methods:
> toBooleanObject(final Boolean defaultValue)
> toCharacter(final Character defaultValue)
> toDoubleObject(final Double defaultValue)
> toInteger(final Integer defaultValue)
> toLongObject(final Long defaultValue)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (WICKET-4580) StringValue: missing methods to convert from text to wrapped classes of primitive type with defaultValue

2013-07-02 Thread Cedric Gatay (JIRA)

[ 
https://issues.apache.org/jira/browse/WICKET-4580?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13698026#comment-13698026
 ] 

Cedric Gatay commented on WICKET-4580:
--

I am also -1 on this, StringValue is already complicated enough with the toXX 
methods in it.

> StringValue: missing methods to convert from text to wrapped classes of 
> primitive type with defaultValue
> 
>
> Key: WICKET-4580
> URL: https://issues.apache.org/jira/browse/WICKET-4580
> Project: Wicket
>  Issue Type: Improvement
>  Components: wicket
>Affects Versions: 1.5.6
>Reporter: manthos
>
> org.apache.wicket.util.string.StringValue has methods to convert from String 
> to a specific type with a defaultValue if text is empty or inconvertible.
> example: 
> public final long toLong(final long defaultValue)
> Missing equivalent methods working with wrapped classes of primitive type. 
> New methods:
> toBooleanObject(final Boolean defaultValue)
> toCharacter(final Character defaultValue)
> toDoubleObject(final Double defaultValue)
> toInteger(final Integer defaultValue)
> toLongObject(final Long defaultValue)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira