You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2009/07/23 19:49:14 UTC

[jira] Commented: (AVRO-82) A large number of Java warnings due to unused vairables etc.

    [ https://issues.apache.org/jira/browse/AVRO-82?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734662#action_12734662 ] 

Doug Cutting commented on AVRO-82:
----------------------------------

These are warnings from your IDE, not warnings seen when building with Ant, right?  Compiling with Ant generates no warnings for me.  Perhaps we should add Checkstyle and/or FindBugs to the Ant compilation if we wish to raise the warning bar?

Also some of the unused fields are fields that should perhaps remain.  For example, in DataFileReader the bug is that we're missing a 'getCount()' accessor, not that we have an unused field.  And in Requestor and Responder, those local variables will soon be used by AVRO-66, a patch we don't want to generate spurious conflicts with.

Removing unused imports seems fine, but rearranging imports can break other patches.  Also, replacing a wildcard import with a non-wildcarded long-term makes future unused imports more likely for folks like me who do not use an IDE (unless we add an equivalent Checkstyle test).  So, again, I'm hesitant to encourage periodic cleanups of this sort without automatic testing that's common to all developers.

If we add Checkstyle and/or FindBugs to Ant compilation, to be effective, we should fail tests if there are any warnings.  Both support the suppression of warnings for specific files, if needed.

> A large number of Java warnings due to unused vairables etc.
> ------------------------------------------------------------
>
>                 Key: AVRO-82
>                 URL: https://issues.apache.org/jira/browse/AVRO-82
>             Project: Avro
>          Issue Type: Improvement
>          Components: java
>            Reporter: Thiruvalluvan M. G.
>            Assignee: Thiruvalluvan M. G.
>            Priority: Minor
>         Attachments: AVRO-82.patch
>
>
> I', creating this JIRA to submit a patch that fix the following:
>    - Unused imports
>    - Unused private fields, local variables
>    - Use of generic types without parameters
>    - Missing setialVersionUID for serializable classes
> There are more than 50 compiler warnings due to these.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.