diff --git a/impl/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginDescriptorCache.java b/impl/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginDescriptorCache.java index df5550517bdb..3371047c87b4 100644 --- a/impl/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginDescriptorCache.java +++ b/impl/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginDescriptorCache.java @@ -67,21 +67,17 @@ public PluginDescriptor get(Key cacheKey) { public PluginDescriptor get(Key key, PluginDescriptorSupplier supplier) throws PluginDescriptorParsingException, PluginResolutionException, InvalidPluginDescriptorException { - try { - PluginDescriptor desc = descriptors.get(key); - if (desc == null) { - synchronized (key) { - desc = descriptors.get(key); - if (desc == null) { - desc = supplier.load(); - descriptors.putIfAbsent(key, clone(desc)); - } + PluginDescriptor desc = descriptors.get(key); + if (desc == null) { + synchronized (key) { + desc = descriptors.get(key); + if (desc == null) { + desc = supplier.load(); + descriptors.putIfAbsent(key, clone(desc)); } } - return clone(desc); - } catch (PluginDescriptorParsingException | PluginResolutionException | InvalidPluginDescriptorException e) { - throw e; } + return clone(desc); } public void put(Key cacheKey, PluginDescriptor pluginDescriptor) {