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

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -