You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Cees de Groot (JIRA)" <ji...@apache.org> on 2010/09/27 20:45:44 UTC
[jira] Issue Comment Edited: (THRIFT-383) Lots of warnings in Java
generated code.
[ https://issues.apache.org/jira/browse/THRIFT-383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12915419#action_12915419 ]
Cees de Groot edited comment on THRIFT-383 at 9/27/10 2:45 PM:
---------------------------------------------------------------
I've done some patching to get our thrift projects to compile cleanly. Patch attached - YMMV :)
(edit: patch is against git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1001590 13f79535-47bb-0310-9956-ffa450edef68)
was (Author: cdegroot):
I've done some patching to get our thrift projects to compile cleanly. Patch attached - YMMV :)
> 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: Java - Compiler
> Reporter: Nitay Joffe
> Priority: Minor
> Attachments: Hbase.thrift, THRIFT-383.diff
>
>
> 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.