Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:fix: was caching the wrong list #3963

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

dseurotech
Copy link
Contributor

Fix for the following stacktrace:

2024-02-07 08:32:19,592 [qtp1027007693-184] ERROR o.e.k.c.s.internal.cache.EntityCache - Cache exception
java.lang.NullPointerException: null
at org.redisson.jcache.JCache.putAsync(JCache.java:1064)
at org.redisson.jcache.JCache.put(JCache.java:1187)
at org.eclipse.kapua.commons.service.internal.cache.EntityCache.putList(EntityCache.java:92)
at org.eclipse.kapua.service.authorization.role.shiro.RolePermissionCachingRepository.findByRoleId(RolePermissionCachingRepository.java:66)
at org.eclipse.kapua.service.authorization.role.shiro.RolePermissionServiceImpl.lambda$findByRoleId$4(RolePermissionServiceImpl.java:162)
at org.eclipse.kapua.storage.TxManagerImpl.execute(TxManagerImpl.java:50)
at org.eclipse.kapua.service.authorization.role.shiro.RolePermissionServiceImpl.findByRoleId(RolePermissionServiceImpl.java:162)
at org.eclipse.kapua.service.authorization.shiro.KapuaAuthorizingRealm.lambda$doGetAuthorizationInfo$5(KapuaAuthorizingRealm.java:167)
at org.eclipse.kapua.commons.security.KapuaSecurityUtils.doPrivileged(KapuaSecurityUtils.java:116)
at org.eclipse.kapua.service.authorization.shiro.KapuaAuthorizingRealm.doGetAuthorizationInfo(KapuaAuthorizingRealm.java:167)
at org.apache.shiro.realm.AuthorizingRealm.getAuthorizationInfo(AuthorizingRealm.java:342)
at org.apache.shiro.realm.AuthorizingRealm.isPermitted(AuthorizingRealm.java:465)
at org.apache.shiro.authz.ModularRealmAuthorizer.isPermitted(ModularRealmAuthorizer.java:239)
at org.apache.shiro.mgt.AuthorizingSecurityManager.isPermitted(AuthorizingSecurityManager.java:117)

Signed-off-by: dseurotech <davide.salvador@eurotech.com>
Copy link

codecov bot commented Feb 9, 2024

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (0828ec9) 21.18% compared to head (409c6b3) 21.18%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             develop    #3963   +/-   ##
==========================================
  Coverage      21.18%   21.18%           
  Complexity        10       10           
==========================================
  Files           1938     1938           
  Lines          41181    41181           
  Branches        3780     3780           
==========================================
+ Hits            8724     8726    +2     
+ Misses         32051    32050    -1     
+ Partials         406      405    -1     
Files Coverage Δ
...on/role/shiro/RolePermissionCachingRepository.java 13.63% <0.00%> (ø)

... and 1 file with indirect coverage changes

@Coduz Coduz added the Bug This is a bug or an unexpected behaviour. Fix it! label Feb 9, 2024
@Coduz Coduz merged commit 6b580c5 into eclipse:develop Feb 9, 2024
32 of 33 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug or an unexpected behaviour. Fix it!
Projects
Development

Successfully merging this pull request may close these issues.

2 participants