tycho/0004-Fix-uncaught-exception.patch

32 lines
1.4 KiB
Diff
Raw Normal View History

From 8c8bea67c3bc50acef79b2ccf2c0439c8bae5192 Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@redhat.com>
Date: Thu, 20 Feb 2020 16:08:00 +0000
Subject: [PATCH 4/7] Fix uncaught exception
"unreported exception org.codehaus.plexus.configuration.PlexusConfigurationException; must be caught or declared to be thrown"
---
.../tycho/extras/sourcefeature/SourceFeatureMojo.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tycho-extras/tycho-source-feature-plugin/src/main/java/org/eclipse/tycho/extras/sourcefeature/SourceFeatureMojo.java b/tycho-extras/tycho-source-feature-plugin/src/main/java/org/eclipse/tycho/extras/sourcefeature/SourceFeatureMojo.java
index 0433b397..9a8e99f3 100644
--- a/tycho-extras/tycho-source-feature-plugin/src/main/java/org/eclipse/tycho/extras/sourcefeature/SourceFeatureMojo.java
+++ b/tycho-extras/tycho-source-feature-plugin/src/main/java/org/eclipse/tycho/extras/sourcefeature/SourceFeatureMojo.java
@@ -567,7 +567,12 @@ public class SourceFeatureMojo extends AbstractMojo {
}
private String getAttribute(PlexusConfiguration dom, String attrName) {
- String attr = dom.getAttribute(attrName);
+ String attr = null;
+ try {
+ attr = dom.getAttribute(attrName);
+ } catch (Exception ex) {
+ attr = null;
+ }
if (attr == null) {
return null;
}
--
2.28.0