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 45212] New: AbstractReplicatedMap. entrySet returns values not entries.
Date Mon, 16 Jun 2008 15:09:44 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=45212

           Summary: AbstractReplicatedMap.entrySet returns values not
                    entries.
           Product: Tomcat 6
           Version: 6.0.16
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Cluster
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: robert.newson@gmail.com


AbstractReplicatedMap implements entrySet() as follows;

        public Set entrySet() {
            LinkedHashSet set = new LinkedHashSet(super.size());
            Iterator i = super.entrySet().iterator();
            while ( i.hasNext() ) {
                Map.Entry e = (Map.Entry)i.next();
                Object key = e.getKey();
                MapEntry entry = (MapEntry)super.get(key);
                if ( entry != null && entry.isPrimary() )
set.add(entry.getValue());
            }
            return Collections.unmodifiableSet(set);
        }

this returns a set of all the *values*, the line set.add(entry.getValue())
should be set.add(entry);


-- 
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