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.