You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Garrett Wu (JIRA)" <ji...@apache.org> on 2012/11/15 00:50:12 UTC

[jira] [Updated] (AVRO-1047) Generated Java classes for specific records contain unchecked casts

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

Garrett Wu updated AVRO-1047:
-----------------------------

    Attachment: suppress-warnings.tar.gz

I'm using Oracle Java 1.6.0_31.

I've attached a small example to demonstrate the @SuppressWarnings("all") seems to have no effect for me.

{code}
$ javac -version
javac 1.6.0_31

$ javac Foo.java # Using @SuppressWarnings("all")
Note: Foo.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

$ javac Bar.java # Using @SuppressWarnings("unchecked")
{code}
                
> Generated Java classes for specific records contain unchecked casts
> -------------------------------------------------------------------
>
>                 Key: AVRO-1047
>                 URL: https://issues.apache.org/jira/browse/AVRO-1047
>             Project: Avro
>          Issue Type: Bug
>          Components: java
>    Affects Versions: 1.6.3
>            Reporter: Garrett Wu
>         Attachments: AVRO-1047.patch, suppress-warnings.tar.gz
>
>
> The generated Java classes for specific records cause compiler warnings using Oracle/Sun Java 1.6, since it doesn't support @SuppressWarnings("all"). Instead could we change it to @SuppressWarnings("unchecked")? Only "unchecked" and "deprecation" are mentioned Java Language Specification -- the rest are specific to compiler vendors.

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