Skip to content

Null key returned for cache operation  #3089

@wangsp188

Description

@wangsp188
@Cacheable(key="@cpwTcrCampaignKey.getAccountIdTcrCampaignIdPrefix()")
public Integer hello2(String key,boolean xx){
    return Integer.parseInt(key);
}

if this @cpwTcrCampaignKey.getAccountIdTcrCampaignIdPrefix() return null
then throw error.
java.lang.IllegalArgumentException: Null key returned for cache operation (maybe you are using named params on classes without debug info?) Builder[public java.lang.Integer test.ground.springcache.SpringCacheService.hello2(java.lang.String,boolean)] caches=[h1] | key='@cpwTcrCampaignKey.getAccountIdTcrCampaignIdPrefix()' | keyGenerator='' | cacheManager='' | cacheResolver='' | condition='' | unless='' | sync='false'

Can we not handle the cache when return is null not throw error to main thread?

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions