You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Sebastian Nagel (JIRA)" <ji...@apache.org> on 2013/04/26 21:32:16 UTC

[jira] [Updated] (NUTCH-1549) Fix deprecated use of Tika MimeType API in o.a.n.util.MimeUtil

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

Sebastian Nagel updated NUTCH-1549:
-----------------------------------

    Fix Version/s: 1.8
    
> Fix deprecated use of Tika MimeType API in o.a.n.util.MimeUtil 
> ---------------------------------------------------------------
>
>                 Key: NUTCH-1549
>                 URL: https://issues.apache.org/jira/browse/NUTCH-1549
>             Project: Nutch
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 1.6, 2.1
>            Reporter: Lewis John McGibbney
>             Fix For: 2.3, 1.8
>
>
> There are still problems with this issue (which actually builds on from the work undertaken by [~markus17] on NUTCH-1230). I meant to mention and address them ages ago and they recently resurfaced Whilst tackling NUTCH-1273. The following code is deprecated 
> {code}
> 170 	// If no mime-type header, or cannot find a corresponding registered
> 171 	// mime-type, then guess a mime-type from the url pattern
> 172 	type = this.mimeTypes.getMimeType(url) != null ? this.mimeTypes
> 173 	.getMimeType(url) : type;
> 174 	}
> 175 	
> {code}
> Thanks to Nick Burch over on Tika, I attempted to upgrade it to the following
> {code}
> String mt = getMimeType(url);
> type = mt != null ? mt : type;
> {code} 
> Which will of course not compile as the javac rightly flags incompatible types as the error.
> This is present in both trunk and 2.x and we should address it once and for all.

--
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