Skip to content

NullPointerException in createCache(String name) #25

@bmarwell

Description

@bmarwell

Hi there,

if a cache is not configured in ehcache.xml, you'll get a NPE.

The problamatic part is configurationbuilder which can be null. You still call the build() method without checking.

Suggestion:

      if (null == configurationBuilder) {
        throw new IllegalStateException("No configuration for the cache with the name [" + name + "] was found. "
            + "Please add it to your ehcache.xml file.");
      }

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