Improve UtilProperties.java with a new Method getPropertyNumber which returns an Object of the Number
----------------------------------------------------------------------------------------------------- Key: OFBIZ-3418 URL: https://issues.apache.org/jira/browse/OFBIZ-3418 Project: OFBiz Issue Type: Improvement Components: framework Affects Versions: SVN trunk Reporter: Mirko Vogelsmeier Priority: Minor Fix For: SVN trunk Improvement of UtilProperties.java with a new method which returns the Number as an Object of the specified property name from the specified resource/properties file. If the specified property name or properties file is not found, the defaultObject is returned. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
[ https://issues.apache.org/jira/browse/OFBIZ-3418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mirko Vogelsmeier updated OFBIZ-3418: ------------------------------------- Attachment: apache_ofbiz_community.patch A Patch concerning this "Issue". Added the method public static <C extends Object> C getPropertyNumber(URL url, String name, C defaultObject, Class<C> clz) to UtilProperties.java > Improve UtilProperties.java with a new Method getPropertyNumber which returns an Object of the Number > ----------------------------------------------------------------------------------------------------- > > Key: OFBIZ-3418 > URL: https://issues.apache.org/jira/browse/OFBIZ-3418 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Mirko Vogelsmeier > Priority: Minor > Fix For: SVN trunk > > Attachments: apache_ofbiz_community.patch > > Original Estimate: 0.03h > Remaining Estimate: 0.03h > > Improvement of UtilProperties.java with a new method which returns the Number as an Object of the specified property name from the specified resource/properties file. > If the specified property name or properties file is not found, the defaultObject is returned. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mirko Vogelsmeier resolved OFBIZ-3418. -------------------------------------- Resolution: Fixed patch in attachment > Improve UtilProperties.java with a new Method getPropertyNumber which returns an Object of the Number > ----------------------------------------------------------------------------------------------------- > > Key: OFBIZ-3418 > URL: https://issues.apache.org/jira/browse/OFBIZ-3418 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Mirko Vogelsmeier > Priority: Minor > Fix For: SVN trunk > > Attachments: apache_ofbiz_community.patch > > Original Estimate: 0.03h > Remaining Estimate: 0.03h > > Improvement of UtilProperties.java with a new method which returns the Number as an Object of the specified property name from the specified resource/properties file. > If the specified property name or properties file is not found, the defaultObject is returned. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mirko Vogelsmeier updated OFBIZ-3418: ------------------------------------- Summary: Improve UtilProperties.java with a new Method getPropertyNumber which returns an Object of the Number or a defaultObject (was: Improve UtilProperties.java with a new Method getPropertyNumber which returns an Object of the Number) > Improve UtilProperties.java with a new Method getPropertyNumber which returns an Object of the Number or a defaultObject > ------------------------------------------------------------------------------------------------------------------------ > > Key: OFBIZ-3418 > URL: https://issues.apache.org/jira/browse/OFBIZ-3418 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Mirko Vogelsmeier > Priority: Minor > Fix For: SVN trunk > > Attachments: apache_ofbiz_community.patch > > Original Estimate: 0.03h > Remaining Estimate: 0.03h > > Improvement of UtilProperties.java with a new method which returns the Number as an Object of the specified property name from the specified resource/properties file. > If the specified property name or properties file is not found, the defaultObject is returned. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Adrian Crum reopened OFBIZ-3418: -------------------------------- Mirko, Leave the issue open - the person who reviews and commits your patch will close it. The new method is a good idea. What might make this more intuitive would be to have methods like getPropertyAsInt(...), getPropertyAsLong(...), etc. I have considered adding getPropertyAsBoolean(...) because a lot of settings are true/false. > Improve UtilProperties.java with a new Method getPropertyNumber which returns an Object of the Number or a defaultObject > ------------------------------------------------------------------------------------------------------------------------ > > Key: OFBIZ-3418 > URL: https://issues.apache.org/jira/browse/OFBIZ-3418 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Mirko Vogelsmeier > Priority: Minor > Fix For: SVN trunk > > Attachments: apache_ofbiz_community.patch > > Original Estimate: 0.03h > Remaining Estimate: 0.03h > > Improvement of UtilProperties.java with a new method which returns the Number as an Object of the specified property name from the specified resource/properties file. > If the specified property name or properties file is not found, the defaultObject is returned. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3418?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mirko Vogelsmeier updated OFBIZ-3418: ------------------------------------- Attachment: UtilProperties.java.patch Hi, i did update my method "getPropertyNumber" a bit and as requested i added "getPropertyAsInteger / asLong / AsFloat / AsDouble / AsBigInteger / AsBigDecimal". In addition i added a "getPropertyAsBoolean". > Improve UtilProperties.java with a new Method getPropertyNumber which returns an Object of the Number or a defaultObject > ------------------------------------------------------------------------------------------------------------------------ > > Key: OFBIZ-3418 > URL: https://issues.apache.org/jira/browse/OFBIZ-3418 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Mirko Vogelsmeier > Priority: Minor > Fix For: SVN trunk > > Attachments: apache_ofbiz_community.patch, UtilProperties.java.patch > > Original Estimate: 0.03h > Remaining Estimate: 0.03h > > Improvement of UtilProperties.java with a new method which returns the Number as an Object of the specified property name from the specified resource/properties file. > If the specified property name or properties file is not found, the defaultObject is returned. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
In reply to this post by Nicolas Malin (Jira)
[ https://issues.apache.org/jira/browse/OFBIZ-3418?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12838837#action_12838837 ] Mirko Vogelsmeier commented on OFBIZ-3418: ------------------------------------------ What do you think about this Patch? > Improve UtilProperties.java with a new Method getPropertyNumber which returns an Object of the Number or a defaultObject > ------------------------------------------------------------------------------------------------------------------------ > > Key: OFBIZ-3418 > URL: https://issues.apache.org/jira/browse/OFBIZ-3418 > Project: OFBiz > Issue Type: Improvement > Components: framework > Affects Versions: SVN trunk > Reporter: Mirko Vogelsmeier > Priority: Minor > Fix For: SVN trunk > > Attachments: apache_ofbiz_community.patch, UtilProperties.java.patch > > Original Estimate: 0.03h > Remaining Estimate: 0.03h > > Improvement of UtilProperties.java with a new method which returns the Number as an Object of the specified property name from the specified resource/properties file. > If the specified property name or properties file is not found, the defaultObject is returned. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. |
Free forum by Nabble | Edit this page |