From 80e8388480b27d02c9d6379acef959d73e4ae362 Mon Sep 17 00:00:00 2001 From: Sascha Szott Date: Wed, 13 Dec 2023 11:06:40 +0100 Subject: [PATCH] skip processing in EmbeddablePlumXMetricProvider as soon as possible --- .../embeddable/impl/EmbeddablePlumXMetricProvider.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dspace-api/src/main/java/org/dspace/metrics/embeddable/impl/EmbeddablePlumXMetricProvider.java b/dspace-api/src/main/java/org/dspace/metrics/embeddable/impl/EmbeddablePlumXMetricProvider.java index d9930c8e413c..5d760a0059ae 100644 --- a/dspace-api/src/main/java/org/dspace/metrics/embeddable/impl/EmbeddablePlumXMetricProvider.java +++ b/dspace-api/src/main/java/org/dspace/metrics/embeddable/impl/EmbeddablePlumXMetricProvider.java @@ -139,6 +139,10 @@ public void setPublicationListViewEnabled(boolean publicationListViewEnabled) { @Override public boolean hasMetric(Context context, Item item, List retrivedStoredMetrics) { + if (!super.hasMetric(context, item, retrivedStoredMetrics)) { + return false; + } + String entityType = getEntityType(item); if (entityType != null) { if (entityType.equals("Person")) { @@ -162,8 +166,6 @@ public boolean hasMetric(Context context, Item item, List retrivedS } } } - } else { - return false; } return false; }