Skip to content

Commit

Permalink
A little nicer lambda syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
hugithordarson committed Jun 14, 2024
1 parent 3b6b4fe commit 765a4a3
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,7 @@ private Optional<byte[]> bytesForAnyResource( final String resourceName, Resourc
Optional<byte[]> resource;

if( _cachingEnabled() ) {
final Map<String, Optional<byte[]>> cacheMap = resourceCache.computeIfAbsent( resourceType, s -> {
return new ConcurrentHashMap<>();
} );
final Map<String, Optional<byte[]>> cacheMap = resourceCache.computeIfAbsent( resourceType, _unused -> new ConcurrentHashMap<>() );

resource = cacheMap.get( resourceName );

Expand Down

0 comments on commit 765a4a3

Please sign in to comment.