You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Lewis John McGibbney (JIRA)" <ji...@apache.org> on 2013/03/28 21:01:18 UTC

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

Lewis John McGibbney created NUTCH-1549:
-------------------------------------------

             Summary: 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: 2.1, 1.6
            Reporter: Lewis John McGibbney
             Fix For: 1.7, 2.2


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