[ 
https://issues.apache.org/jira/browse/TIKA-661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Henning Gross updated TIKA-661:
-------------------------------

    Attachment: MimeType.getExtensionsPatch.txt

Patch that adds getExtensions() and addExtension() as well as a test to core 
component. 
It does not remove but adjust the old getExtension() and setExtension() methods 
for code compatibility but they are now obsolete.

> MimeType class does contain a String with accessor named Extension. This 
> should be a List<String> Extensions due to several reasons.
> ------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TIKA-661
>                 URL: https://issues.apache.org/jira/browse/TIKA-661
>             Project: Tika
>          Issue Type: Bug
>          Components: mime
>    Affects Versions: 0.9
>            Reporter: Henning Gross
>              Labels: features, newbie, patch
>         Attachments: MimeType.getExtensionsPatch.txt
>
>
> The javadoc for the method suggest that it will return the "preferred 
> extension" for a MimeType. Acutally its the first Extension deserialized from 
> tika-mimetypes.xml. The method would have to be renamed to 
> getFirstExtensionInList(). This pretty much points at the fact that this 
> method makes no sense at all. 
> There are several use-cases in which one would want to know ALL known valid 
> extensions for one mime type. I will submit a patch later today.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to