Skip to content

Commit

Permalink
Merge pull request #2029 from sswguo/hotfix
Browse files Browse the repository at this point in the history
Fix: Null values are not supported
  • Loading branch information
sswguo authored Jan 29, 2022
2 parents a2fc546 + 1fe60fb commit a7ec8e4
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -601,13 +601,16 @@ private ArtifactStore computeIfAbsent( String name, StoreKey key, int expiration
DtxArtifactStore dtxArtifactStore = storeQuery.getArtifactStore( key.getPackageType(), key.getType(), key.getName() );

store = toArtifactStore( dtxArtifactStore );
if ( expirationMins > 0 )
{
cache.put( key, store, expirationMins, TimeUnit.MINUTES );
}
else
if ( store != null )
{
cache.put( key, store );
if (expirationMins > 0)
{
cache.put(key, store, expirationMins, TimeUnit.MINUTES);
}
else
{
cache.put(key, store);
}
}
}

Expand Down

0 comments on commit a7ec8e4

Please sign in to comment.