Skip to content

IllegalStateException on calling free for pooled item to synchronized pool using soft references and being full #746

@sta4152

Description

@sta4152

Usig com.esotericsoftware.kryo.util.Pool with threadSafe = true and softReferences = true and a limit.

On calling free and the pool already being full, an IllegalStateException is thrown:
java.lang.IllegalStateException: Queue full at java.util.AbstractQueue.add(AbstractQueue.java:98) ~[?:?] at com.esotericsoftware.kryo.util.Pool$SoftReferenceQueue.offer(Pool.java:157) ~[76:com.esotericsoftware.kryo:5.0.0.RC5] at com.esotericsoftware.kryo.util.Pool.free(Pool.java:86) ~[76:com.esotericsoftware.kryo:5.0.0.RC5]

A LinkedBlockingQueue is used in this case with the "add" method not bein overwritten and being called in the SoftReferenceQueue's offer method.

This doe not happen with one of the boolean parameters set to false.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions