tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 49100] New: Mutable public constants: MemberImpl.TRIBES_MBR_BEGIN/END
Date Mon, 12 Apr 2010 19:52:25 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=49100

           Summary: Mutable public constants:
                    MemberImpl.TRIBES_MBR_BEGIN/END
           Product: Tomcat 7
           Version: trunk
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: sebb@apache.org


The fields

tribes.membership.MemberImpl.TRIBES_MBR_BEGIN
tribes.membership.MemberImpl.TRIBES_MBR_END

are intended to be constants, but they are defined as 
   public static final transient byte[] 
These are non-empty arrays, so they are not immutable.

TRIBES_MBR_END does not seem to be accessed outside its class, so could be made
private to protect it.

TRIBES_MBR_BEGIN only seems to be used in
tribes.membership.McastServiceImpl.receive()
so the field could be made package protected.

Alternatively, the method call
XByteBuffer.firstIndexOf(data,0,MemberImpl.TRIBES_MBR_BEGIN)
could be refactored and moved to MemberImpl in which case the field could be
made private.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message