dictionary - java.lang.NegativeArraySizeException with WeakHashMap keySet -
i have following code:
public synchronized static arraylist<httpsession> getcurrentsessionlist() { return new arraylist<httpsession>(sessions.keyset()); }
we have client getting java.lang.negativearraysizeexception
list initialised values of keys map sessions
. unable replicate it. using openjdk 7 build 71, on linux.
sessions
weakhashmap assume causing issue. understand creating new list create hard-reference items in maps, short lived , used reporting on contents of map.
the reason arraylist created items can manipulated in loops etc., without having worry items in weakhashmap disappearing.
can suggest safe way of initialising list?
Comments
Post a Comment