zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From afine <...@git.apache.org>
Subject [GitHub] zookeeper pull request #232: ZOOKEEPER-2731: Cleanup findbug warnings in bra...
Date Mon, 24 Apr 2017 19:14:00 GMT
Github user afine commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/232#discussion_r113032297
  
    --- Diff: src/java/main/org/apache/jute/compiler/JType.java ---
    @@ -27,7 +27,7 @@
     	private String mCName;
         private String mCppName;
         private String mCsharpName;
    -    private String mJavaName;
    +    protected String mJavaName;
    --- End diff --
    
    @rakeshadr this fixes findbugs issues added by ZOOKEEPER-1045:
    
    > Bug type EI_EXPOSE_REP
    > In class org.apache.zookeeper.server.quorum.QuorumAuthPacket
    > In method org.apache.zookeeper.server.quorum.QuorumAuthPacket.getToken()
    > Field org.apache.zookeeper.server.quorum.QuorumAuthPacket.token
    > At QuorumAuthPacket.java:[line 50]
    
    and
    
    > Bug type EI_EXPOSE_REP2
    > In class org.apache.zookeeper.server.quorum.QuorumAuthPacket
    > In method new org.apache.zookeeper.server.quorum.QuorumAuthPacket(long, int, byte[])
    > Field org.apache.zookeeper.server.quorum.QuorumAuthPacket.token
    > Local variable named token
    > At QuorumAuthPacket.java:[line 35]
    
    These issues are newer than the findbugs report included with the ZOOKEEPER-2728, which
is why they are not listed there. 
    
    @hanm The reason that this solution is not used in 3.5 (and in other classes of 3.4) is
because we ignore similar issues by including the following in findbugsExcludeFile.xml: 
    
    ```
      <Match>
        <Package name="org.apache.jute.compiler.generated" />
      </Match>
    
      <Match>
        <Package name="~org\.apache\.zookeeper\.(proto|data|txn)" />
        <Bug code="EI, EI2" />
      </Match>
    
      <Match>
        <Class name="org.apache.zookeeper.server.DataNode" />
          <Bug code="EI2"/>
      </Match>
    
      <Match>
        <Class name="org.apache.zookeeper.server.quorum.QuorumPacket" />
           <Bug code="EI2, EI" />
      </Match>
    
      <Match>
        <Class name="org.apache.zookeeper.ClientCnxn"/>
          <Bug code="EI, EI2" />
      </Match>
    ```
    
    I went ahead and updated the patch to remove these entries and made some additional changes
to get rid of all the findbugs warnings. 
    
    Although I am very concerned about the potential performance impact of including all of
these extra clone() operations, particularly as it relates to "node data". What do you think,
should we just ignore the warning on `QuorumAuthPacket.java` or fix the cause?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message