StringBuffer s = new StringBuffer();
            Iterator entries = distinctPrincipals.entrySet().iterator();
            while (entries.hasNext())
            {
                Map.Entry entry = (Map.Entry) entries.next();
                s.append((entry.getKey().toString() + "(" + entry.getValue().toString() + "), "));
            }
            // remove the last comma and blank :
            return s.substring(0, s.length() - 2);
        }

        return String.valueOf(WikiSession.sessions(engine));
    }
}

should be

            StringBuffer s = new StringBuffer();
            Iterator entries = distinctPrincipals.entrySet().iterator();
            while (entries.hasNext())
            {
                Map.Entry entry = (Map.Entry) entries.next();
                s.append((entry.getKey().toString() + "(" + entry.getValue().toString() + "), "));
            }
            // remove the last comma and blank :

            //here!!
            return s.substring(0, s.length() - (s.length() > 2 ? 2 : 0));
        }

        return String.valueOf(WikiSession.sessions(engine));
    }
}

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-1) was last changed on 19-Feb-2008 10:45 by 124.42.38.34