diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-02-05 10:15:06 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-02-05 10:15:18 +0100 |
commit | e4c5970f42097fccb0948be068c3f4dda2352b78 (patch) | |
tree | 5d22d1e0f4d1350c91e44bf64176160e85ca371f /sonar-plugin-api | |
parent | 0a1a8bd87bd186cd86051496c4de4baba6615738 (diff) | |
download | sonarqube-e4c5970f42097fccb0948be068c3f4dda2352b78.tar.gz sonarqube-e4c5970f42097fccb0948be068c3f4dda2352b78.zip |
Fix quality gates
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/Checks.java | 4 | ||||
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/checks/AnnotationCheckFactory.java | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/Checks.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/Checks.java index 3566f57db81..09bb71d7f66 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/Checks.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/rule/Checks.java @@ -162,9 +162,7 @@ public class Checks<C> { } configureFields(activeRule, check); return check; - } catch (InstantiationException e) { - throw failToInstantiateCheck(activeRule, checkClassOrInstance, e); - } catch (IllegalAccessException e) { + } catch (InstantiationException | IllegalAccessException e) { throw failToInstantiateCheck(activeRule, checkClassOrInstance, e); } } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/AnnotationCheckFactory.java b/sonar-plugin-api/src/main/java/org/sonar/api/checks/AnnotationCheckFactory.java index a677bf45b9c..c5303b05c86 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/AnnotationCheckFactory.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/checks/AnnotationCheckFactory.java @@ -83,11 +83,9 @@ public final class AnnotationCheckFactory extends CheckFactory { configureFields(activeRule, check); return check; - } catch (InstantiationException e) { + } catch (InstantiationException | IllegalAccessException e) { throw new SonarException(CAN_NOT_INSTANTIATE_THE_CHECK_RELATED_TO_THE_RULE + activeRule, e); - } catch (IllegalAccessException e) { - throw new SonarException(CAN_NOT_INSTANTIATE_THE_CHECK_RELATED_TO_THE_RULE + activeRule, e); } } |