From b6dd52cf7cd8c47988cfdb9a9887ac4e66c61999 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Thu, 25 May 2017 18:01:53 +0200 Subject: SONAR-9322 deprecate RulesProfile#setParentName(String) Hierarchy of profiles in plugin API has never been implemented. The method is misleading so it's marked as deprecated. --- .../main/java/org/sonar/api/profiles/RulesProfile.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'sonar-plugin-api/src') diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java index 01e1307210d..36e058071dd 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/profiles/RulesProfile.java @@ -64,7 +64,6 @@ public class RulesProfile implements Cloneable { private String name; private Boolean defaultProfile = Boolean.FALSE; private String language; - private String parentName; private List activeRules = new ArrayList<>(); /** @@ -217,22 +216,25 @@ public class RulesProfile implements Cloneable { } /** - * For internal use only. + * Does nothing. * - * @since 2.5 + * @return {@code null} + * @deprecated in 6.5 */ + @Deprecated @CheckForNull public String getParentName() { - return parentName; + return null; } /** - * For internal use only. + * Does nothing. * - * @since 2.5 + * @deprecated in 6.5 */ + @Deprecated public void setParentName(String parentName) { - this.parentName = parentName; + // does nothing } /** @@ -338,7 +340,6 @@ public class RulesProfile implements Cloneable { public Object clone() { RulesProfile clone = RulesProfile.create(getName(), getLanguage()); clone.setDefaultProfile(getDefaultProfile()); - clone.setParentName(getParentName()); if (activeRules != null && !activeRules.isEmpty()) { clone.setActiveRules(Lists.transform(activeRules, CloneFunction.INSTANCE)); } -- cgit v1.2.3