[
https://issues.apache.org/jira/browse/THRIFT-383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12683555#action_12683555
]
Bryan Duxbury commented on THRIFT-383:
--------------------------------------
Scanning through your list of examples, a lot of the stuff in the first batch
(nice to haves) is stuff that can be done with minimal to moderate amounts of
code generator finesse. In particular, stuff like the imports, we don't
necessarily *know* if you'll need the ArrayList declaration until it's actually
used or not. You could probably do a separate pass over all the fields to
decide if you need it or not, but basically, we have to decide if we'd rather
have more code complexity in the generator, or annoying warnings in Eclipse.
We should try and investigate the particular things we can improve though,
especially in the FindBugs section.
> Lots of warnings in Java generated code.
> ----------------------------------------
>
> Key: THRIFT-383
> URL: https://issues.apache.org/jira/browse/THRIFT-383
> Project: Thrift
> Issue Type: Bug
> Components: Compiler (Java)
> Reporter: Nitay Joffe
> Priority: Minor
> Attachments: Hbase.thrift
>
>
> I'm using Thrift from 03/19/09, commit
> 87e73b073889fec8d105cbf3b66bcbf48b4e71e2
> Looking through some Thrift generated Java code for an HBase server under
> Eclipse I see a lot of warnings. I'll attach the thrift IDL separately. I can
> also post some of my Eclipse settings to see all these warnings if need be.
> There's many occurances of these types of warnings. Here's some examples:
>
> - The import java.util.ArrayList is never used
> - The serializable class AlreadyExists does not declare a static final
> serialVersionUID field of type long
> - Redundant superinterface Serializable for the type AlreadyExists, already
> defined by Throwable
> - The field AlreadyExists.__isset is never read locally
> - The method getMessage() of type AlreadyExists should be tagged with
> @Override since it actually overrides a superclass method
> - The local variable first is never read
> - The declared exception TException is not actually thrown by the method
> validate() from type AlreadyExists
> - Duplicate javadoc tags
> - Access to enclosing constructor AlreadyExists.Isset() is emulated by a
> synthetic accessor method. Increasing its visibility will improve your
> performance
> - FindBugs: [H C DMI] Invocation of toString on an array
> [DMI_INVOKING_TOSTRING_ON_ARRAY]
> - FindBugs: [M P Bx] Method invokes inefficient Number constructor; use
> static valueOf instead [DM_NUMBER_CTOR]
> - FindBugs: [M B CN] clone method does not call super.clone()
> [CN_IDIOM_NO_SUPER_CALL]
> The second batch is particularly important because it has potential
> performance issues. The first batch are would be nice to fix things.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.