nutch-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NUTCH-1549) Fix deprecated use of Tika MimeType API in o.a.n.util.MimeUtil
Date Tue, 30 Apr 2013 21:10:16 GMT

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

Hudson commented on NUTCH-1549:
-------------------------------

Integrated in Nutch-trunk #2188 (See [https://builds.apache.org/job/Nutch-trunk/2188/])
    NUTCH-1549 Fix deprecated use of Tika MimeType API in o.a.n.util.MimeUtil (Revision 1477821)

     Result = FAILURE
tejasp : http://svn.apache.org/viewvc/nutch/trunk/?view=rev&rev=1477821
Files : 
* /nutch/trunk/CHANGES.txt
* /nutch/trunk/src/java/org/apache/nutch/util/MimeUtil.java
* /nutch/trunk/src/plugin/index-more/src/java/org/apache/nutch/indexer/more/MoreIndexingFilter.java
* /nutch/trunk/src/plugin/parse-zip/src/java/org/apache/nutch/parse/zip/ZipTextExtractor.java
* /nutch/trunk/src/plugin/protocol-file/src/java/org/apache/nutch/protocol/file/FileResponse.java

                
> 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
>            Assignee: Tejas Patil
>             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

Mime
View raw message