You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nutch.apache.org by "Tejas Patil (JIRA)" <ji...@apache.org> on 2013/04/30 13:20:17 UTC
[jira] [Comment Edited] (NUTCH-1273) Fix [deprecation] javac
warnings
[ https://issues.apache.org/jira/browse/NUTCH-1273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13645434#comment-13645434 ]
Tejas Patil edited comment on NUTCH-1273 at 4/30/13 11:19 AM:
--------------------------------------------------------------
Hey [~lewismc],
I still see deprecation warnings with the patch for 2.x:
{noformat} [javac] /home/tejas/Desktop/nutch/2.x/src/java/org/apache/nutch/util/MimeUtil.java:172: warning: [deprecation] getMimeType(String) in MimeTypes has been deprecated
[javac] type = this.mimeTypes.getMimeType(url) != null ? this.mimeTypes
[javac] ^
[javac] /home/tejas/Desktop/nutch/2.x/src/java/org/apache/nutch/util/MimeUtil.java:173: warning: [deprecation] getMimeType(String) in MimeTypes has been deprecated
[javac] .getMimeType(url) : type;
[javac] ^{noformat}
There was one more deprecation warning in src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/Http.java.
I am attaching a patch over your patch which would address the same. I have verified it against Java versions 1.6.0_38 and 1.7.0_10. If you feel that its fine, then lets get this into the repo.
was (Author: tejasp):
Hey [~lewismc],
I still see deprecation warnings with the patch for 2.x:
{noformat} [javac] /home/tejas/Desktop/nutch/2.x/src/java/org/apache/nutch/util/MimeUtil.java:172: warning: [deprecation] getMimeType(String) in MimeTypes has been deprecated
[javac] type = this.mimeTypes.getMimeType(url) != null ? this.mimeTypes
[javac] ^
[javac] /home/tejas/Desktop/nutch/2.x/src/java/org/apache/nutch/util/MimeUtil.java:173: warning: [deprecation] getMimeType(String) in MimeTypes has been deprecated
[javac] .getMimeType(url) : type;
[javac] ^{noformat}
I am using Oracle Java 1.7.0_10.
> Fix [deprecation] javac warnings
> --------------------------------
>
> Key: NUTCH-1273
> URL: https://issues.apache.org/jira/browse/NUTCH-1273
> Project: Nutch
> Issue Type: Sub-task
> Components: build
> Affects Versions: nutchgora, 1.5
> Reporter: Lewis John McGibbney
> Priority: Minor
> Fix For: 1.7
>
> Attachments: NUTCH-1249.2.x.v2.patch, NUTCH-1273-nutchgora.patch, NUTCH-1273-trunk.patch, NUTCH-1273-v2-trunk.patch, NUTCH-deprecate.patch
>
>
> As part of this task, these warnings should be resolved, however this particular strand of warnings can either be resolved by adding
> {code}
> @SuppressWarnings("deprecation")
> {code}
> or by actually upgrading our class usage to rely upon non-deprecated classes. Which option is more appropriate for the project?
--
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