Skip to content

Caching in/with DataSet is broken #10

Description

@mnlipp

Nice library, thanks. Nevertheless, on a long running server, it needs more and more memory.

DataSet attempts to cache DataSet objects by nationality. However, Nationality does not define hashCode/equals. Thus we get a new entry for every newly generated object of type Nationality. And these objects are generated freely e.g. in Generator.generateRandomNationality. So each invocation of Generator.generateRandomUser effectively adds a DataSet to the cache that never goes away. And eventually, heap space is full, no matter how big it is.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions