commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver Heger (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CONFIGURATION-693) Conversion to File is missing
Date Mon, 26 Mar 2018 15:02:00 GMT

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

Oliver Heger commented on CONFIGURATION-693:
--------------------------------------------

Great, many thanks!

Just one thing: Do you think it makes sense to implement one of the methods _toFile()_ or
_toPath()_ in terms of the other one? So for instance, _toFile()_ could be implemented as
{code:java}
public static File toFile(Object value) throws ConversionException
{
    return toPath(value).toFile();
}{code}
(Maybe with some tweaking of the exception message in case a ConversionException occurs.)
This would reduce the amount of code and some redundancy. Or are there reasons against this?

> Conversion to File is missing
> -----------------------------
>
>                 Key: CONFIGURATION-693
>                 URL: https://issues.apache.org/jira/browse/CONFIGURATION-693
>             Project: Commons Configuration
>          Issue Type: Improvement
>          Components: Type conversion
>    Affects Versions: 2.2
>            Reporter: Lars W
>            Priority: Major
>         Attachments: Converter.patch.txt, Converter.patch.txt
>
>
> PropertyConverter.java misses type conversion to File although a string could be easily
converted to a File.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message