@VisibleForTesting
 static boolean shouldPersistMeasure(@Nullable Resource resource, @Nullable Measure measure) {
   if (resource == null || measure == null) {
     return false;
   }
   return measure.getPersistenceMode().useDatabase()
       && !(ResourceUtils.isEntity(resource) && measure.isBestValue())
       && isMeasureNotEmpty(measure);
 }
Exemplo n.º 2
0
 private void saveOnRequirement(
     DecoratorContext context, Map<TechnicalDebtRequirement, Double> requirementCosts) {
   for (Map.Entry<TechnicalDebtRequirement, Double> entry : requirementCosts.entrySet()) {
     saveCost(
         context,
         entry.getKey().toCharacteristic(),
         entry.getValue(),
         ResourceUtils.isEntity(context.getResource()));
   }
 }