public static void updateMetadata(CacheEntry entry, Metadata providedMetadata) {
      if (entry != null && providedMetadata != null) {
         Metadata mergedMetadata;
         if (entry.getMetadata() == null) {
            mergedMetadata = providedMetadata;
         } else {
            mergedMetadata = applyVersion(entry.getMetadata(), providedMetadata);
         }
         entry.setMetadata(mergedMetadata);
      }
   }
public static void updateMetadata ( CacheEntry entry , Metadata providedMetadata ) { if ( entry != null && providedMetadata != null ) { Metadata mergedMetadata ; if ( entry . getMetadata ( ) == null ) { mergedMetadata = providedMetadata ; } else { mergedMetadata = applyVersion ( entry . getMetadata ( ) , providedMetadata ) ; } entry . setMetadata ( mergedMetadata ) ; } }
Set the {@code providedMetadata} on the cache entry.

If the entry already has a version, copy the version in the new metadata.