diff options
Diffstat (limited to 'sonar-plugin-api/src/main/java/org/sonar/api')
19 files changed, 47 insertions, 471 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/BatchComponent.java b/sonar-plugin-api/src/main/java/org/sonar/api/BatchComponent.java index 4ae6a337048..21c785caa1e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/BatchComponent.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/BatchComponent.java @@ -20,8 +20,20 @@ package org.sonar.api; /** - * Dependency Injection : all the classes implementing this interface are available in the batch IoC container. - * Just add a parameter to the constructor of your component. + * Marker interface for all the components available in container of batch (code analyzer). Note that + * injection of dependencies by constructor is used : + * <pre> + * public class Foo implements BatchComponent { + * + * } + * public class Bar implements BatchComponent { + * private final Foo foo; + * public Bar(Foo f) { + * this.foo = f; + * } + * } + * + * </pre> * * @since 2.2 */ diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/BatchExtension.java b/sonar-plugin-api/src/main/java/org/sonar/api/BatchExtension.java index 6867cdd88b5..95cc1c0f8f7 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/BatchExtension.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/BatchExtension.java @@ -20,7 +20,8 @@ package org.sonar.api; /** - * Batch extension point. + * Marker interface for all the batch extension points, which are aimed to be implemented + * by plugins. * * @since 1.10 */ diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java index e13f6c3581d..079d77ad2e8 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/CoreProperties.java @@ -20,8 +20,7 @@ package org.sonar.api; /** - * CoreProperties is used to group various properties of Sonar as well - * as default values of configuration in a single place + * Non-exhaustive list of constants of core properties. * * @since 1.11 */ diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/Extension.java b/sonar-plugin-api/src/main/java/org/sonar/api/Extension.java index a0ccc09fddc..1c5c8a52c07 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/Extension.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/Extension.java @@ -20,7 +20,7 @@ package org.sonar.api; /** - * Extension point. + * Plugin extension point * * @since 1.10 */ diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java b/sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java index c0c1340b387..ea7bbc755e9 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/Plugin.java @@ -22,10 +22,11 @@ package org.sonar.api; import java.util.List; /** - * A plugin is a group of extensions. See <code>org.sonar.api.Extension</code> interface to get all extension points. + * A plugin is a group of extensions. See <code>org.sonar.api.Extension</code> interface to browse + * available extension points. * <p/> * <p>The manifest property <code>Plugin-Class</code> must declare the name of the implementation class. - * See META-INF/MANIFEST.MF.</p> + * It is automatically set by sonar-packaging-maven-plugin when building plugins.</p> * * @see org.sonar.api.Extension * @since 1.10 diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/Properties.java b/sonar-plugin-api/src/main/java/org/sonar/api/Properties.java index 8191edf3319..c41c9f30958 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/Properties.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/Properties.java @@ -24,6 +24,11 @@ import java.lang.annotation.RetentionPolicy; /** * Plugin properties. This annotation is only used on classes implementing org.sonar.api.Plugin. + * <p/> + * Note that {@link org.sonar.api.config.PropertyDefinition} is an alternative, programmatic and recommended approach + * to declare properties. + * <p/> + * Effective property values are accessible at runtime through the component {@link org.sonar.api.config.Settings} * * @since 1.10 */ diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/Property.java b/sonar-plugin-api/src/main/java/org/sonar/api/Property.java index e9a6fdc50c5..5b0b10964d9 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/Property.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/Property.java @@ -28,18 +28,11 @@ import java.lang.annotation.Target; * Property value can be set in different ways : * <ul> * <li>System property</li> - * <li>Maven command-line (-Dfoo=bar)</li> + * <li>Batch command-line (-Dfoo=bar in Maven or sonar-runner)</li> * <li>Maven pom.xml (element <properties>)</li> * <li>Maven settings.xml</li> - * <li>Sonar web interface</li> + * <li>SonarQube web administration console</li> * </ul> - * <p/> - * Value is accessible in batch extensions via the Configuration object of class <code>org.sonar.api.resources.Project</code> - * (see method <code>getConfiguration()</code>). - * <p/> - * <p><strong>Must be used in <code>org.sonar.api.Plugin</code> classes only.</strong></p> - * <p></p> - * It's recommended to use the class {@link org.sonar.api.config.PropertyDefinition} since v3.6. * * @since 1.10 */ diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/ServerComponent.java b/sonar-plugin-api/src/main/java/org/sonar/api/ServerComponent.java index e2f30ed3460..281c3058a7a 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/ServerComponent.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/ServerComponent.java @@ -20,8 +20,7 @@ package org.sonar.api; /** - * Dependency Injection : all the classes implementing this interface are available in the server IoC container. - * Just add a parameter to the constructor of your component. + * Same than {@link org.sonar.api.BatchComponent} but for server-side components. * * @since 2.2 */ diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/SonarPlugin.java b/sonar-plugin-api/src/main/java/org/sonar/api/SonarPlugin.java index 6e029ebcf96..c66422b6467 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/SonarPlugin.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/SonarPlugin.java @@ -20,7 +20,10 @@ package org.sonar.api; /** - * A plugin is a group of extensions. See {@link Extension} interface to get all extension points. + * Plugin entry-point used to declare its extensions (see {@link org.sonar.api.Extension}. + * <p/> + * <p>The JAR manifest must declare the name of the implementation class in the property <code>Plugin-Class</code>. + * This property is automatically set by sonar-packaging-maven-plugin when building plugin.</p> * * @since 2.8 */ diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/charts/AbstractChart.java b/sonar-plugin-api/src/main/java/org/sonar/api/charts/AbstractChart.java deleted file mode 100644 index b7e5006ad9d..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/charts/AbstractChart.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.api.charts; - -import org.jfree.chart.JFreeChart; -import org.jfree.chart.plot.CategoryPlot; -import org.jfree.chart.plot.Plot; -import org.jfree.chart.renderer.AbstractRenderer; -import org.jfree.chart.title.TextTitle; -import org.jfree.data.Values2D; - -import java.awt.Color; -import java.awt.image.BufferedImage; - -/** - * An extension point to generate JFreeChart charts - * - * @since 1.10 - */ -public abstract class AbstractChart implements Chart { - - public static final int FONT_SIZE = 13; - public static final Color OUTLINE_COLOR = new Color(51, 51, 51); - public static final Color GRID_COLOR = new Color(204, 204, 204); - public static final Color[] COLORS = new Color[] { Color.decode("#4192D9"), Color.decode("#800000"), Color.decode("#A7B307"), - Color.decode("#913C9F"), Color.decode("#329F4D") }; - - protected abstract Plot getPlot(ChartParameters params); - - protected boolean hasLegend() { - return false; - } - - /** - * Generates a JFreeChart chart using a set of parameters - * - * @param params the chart parameters - * @return the generated chart - */ - public BufferedImage generateImage(ChartParameters params) { - JFreeChart chart = new JFreeChart(null, TextTitle.DEFAULT_FONT, getPlot(params), hasLegend()); - improveChart(chart, params); - return chart.createBufferedImage(params.getWidth(), params.getHeight()); - } - - private void improveChart(JFreeChart jfrechart, ChartParameters params) { - Color background = Color.decode("#" + params.getValue(ChartParameters.PARAM_BACKGROUND_COLOR, "FFFFFF", false)); - jfrechart.setBackgroundPaint(background); - - jfrechart.setBorderVisible(false); - jfrechart.setAntiAlias(true); - jfrechart.setTextAntiAlias(true); - jfrechart.removeLegend(); - } - - @Override - public String toString() { - return getKey(); - } - - /** - * Helper to set color of series. If the parameter colorsHex is null, then default Sonar colors are used. - */ - protected void configureColors(Values2D dataset, CategoryPlot plot, String[] colorsHex) { - Color[] colors = COLORS; - if (colorsHex != null && colorsHex.length > 0) { - colors = new Color[colorsHex.length]; - for (int i = 0; i < colorsHex.length; i++) { - colors[i] = Color.decode("#" + colorsHex[i]); - } - } - - dataset.getColumnCount(); - AbstractRenderer renderer = (AbstractRenderer) plot.getRenderer(); - for (int i = 0; i < dataset.getColumnCount(); i++) { - renderer.setSeriesPaint(i, colors[i % colors.length]); - - } - } -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/charts/Chart.java b/sonar-plugin-api/src/main/java/org/sonar/api/charts/Chart.java deleted file mode 100644 index ac3080bfe8e..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/charts/Chart.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.api.charts; - -import org.sonar.api.ServerExtension; - -import java.awt.image.BufferedImage; - -/** - * An Extension to create charts - * - * @since 1.10 - */ -public interface Chart extends ServerExtension { - String getKey(); - - /** - * The method to implement to generate the chart - * - * @param params the chart parameters - * @return the image generated - */ - BufferedImage generateImage(ChartParameters params); -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/charts/ChartParameters.java b/sonar-plugin-api/src/main/java/org/sonar/api/charts/ChartParameters.java deleted file mode 100644 index 1f821aead01..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/charts/ChartParameters.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.api.charts; - -import org.apache.commons.lang.CharEncoding; -import org.apache.commons.lang.StringUtils; -import org.apache.commons.lang.text.StrTokenizer; -import org.sonar.api.utils.SonarException; - -import java.io.UnsupportedEncodingException; -import java.net.URLDecoder; -import java.util.HashMap; -import java.util.Locale; -import java.util.Map; - -/** - * The class to hold parameters to configure a chart - * @since 1.10 - */ -public class ChartParameters { - private static final String[] EMPTY = new String[0]; - - public static final String PARAM_WIDTH = "w"; - public static final String PARAM_BACKGROUND_COLOR = "bgc"; - public static final String PARAM_HEIGHT = "h"; - public static final int MAX_WIDTH = 900; - public static final String PARAM_LOCALE = "locale"; - - public static final int MAX_HEIGHT = 900; - public static final int DEFAULT_WIDTH = 200; - - public static final int DEFAULT_HEIGHT = 200; - - - private final Map<String, String> params; - - /** - * Creates a ChartParameter based on a list of parameters - * @param params the list of parameters - */ - public ChartParameters(Map<String, String> params) { - this.params = params; - } - - /** - * Creates a Chartparameter based on a query string with a format key1=value1&key2=value2... - * - * @param queryString string - */ - public ChartParameters(String queryString) { - this.params = new HashMap<String, String>(); - String[] groups = StringUtils.split(queryString, "&"); - for (String group : groups) { - String[] keyval = StringUtils.split(group, "="); - params.put(keyval[0], keyval[1]); - } - } - - /** - * Shortcut to getValue with no decoding and no default value - * @param key the param ket - * @return the value of the param - */ - public String getValue(String key) { - return getValue(key, "", false); - } - - /** - * Returns the [decoded or not] value of a param from its key or the default value - * if id does not exist - * - * @param key the param ket - * @param defaultValue the default value if not exist - * @param decode whther the value should be decoded - * @return the value of the param - */ - - public String getValue(String key, String defaultValue, boolean decode) { - String val = params.get(key); - if (decode) { - val = decode(val); - } - if (val == null) { - val = defaultValue; - } - return val; - } - - /** - * Returns an array of a param values, given its key and the values delimiter - * - * @param key the param key - * @param delimiter the values delimiter - * @return the list of vaalues - */ - public String[] getValues(String key, String delimiter) { - String value = params.get(key); - if (value != null) { - return StringUtils.split(value, delimiter); - } - return EMPTY; - } - - /** - * Returns an array of a param values, given its key and the values delimiter - * Values can be decoded or not - * - * @param key the param key - * @param delimiter the values delimiter - * @param decode whether to decode values - * @return the list of vaalues - */ - public String[] getValues(String key, String delimiter, boolean decode) { - String value = params.get(key); - if (value != null) { - if (decode) { - value = decode(value); - } - return new StrTokenizer(value, delimiter).setIgnoreEmptyTokens(false).getTokenArray(); - } - return EMPTY; - } - - /** - * Get the chart width - * - * @return width - */ - public int getWidth() { - int width = Integer.parseInt(getValue(PARAM_WIDTH, "" + DEFAULT_WIDTH, false)); - return Math.min(width, MAX_WIDTH); - } - - /** - * Get the chart height - * - * @return height - */ - public int getHeight() { - int height = Integer.parseInt(getValue(PARAM_HEIGHT, "" + DEFAULT_HEIGHT, false)); - return Math.min(height, MAX_HEIGHT); - } - - /** - * Get the Locale - * - * @return Locale - */ - public Locale getLocale() { - String locale = getValue(PARAM_LOCALE); - if (StringUtils.isNotBlank(locale)) { - return new Locale(locale); - } - return Locale.ENGLISH; - } - - private String decode(String val) { - if (val != null) { - try { - val = URLDecoder.decode(val, CharEncoding.UTF_8); - } catch (UnsupportedEncodingException e) { - throw new SonarException("Decoding chart parameter : " + val, e); - } - } - return val; - } -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/charts/package-info.java b/sonar-plugin-api/src/main/java/org/sonar/api/charts/package-info.java deleted file mode 100644 index 358d4bbef40..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/charts/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -@ParametersAreNonnullByDefault -package org.sonar.api.charts; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/NoSonarFilter.java b/sonar-plugin-api/src/main/java/org/sonar/api/checks/NoSonarFilter.java deleted file mode 100644 index 05c4bd9bfaf..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/NoSonarFilter.java +++ /dev/null @@ -1,67 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.api.checks; - -import com.google.common.collect.Maps; -import org.apache.commons.lang.StringUtils; -import org.sonar.api.batch.SensorContext; -import org.sonar.api.resources.Resource; -import org.sonar.api.rules.Violation; -import org.sonar.api.rules.ViolationFilter; - -import java.util.Map; -import java.util.Set; - -/** - * @since 2.1 - * @deprecated in 3.6. Replaced by {@link org.sonar.api.issue.NoSonarFilter} - */ -@Deprecated -public class NoSonarFilter implements ViolationFilter { - - private final Map<Resource, Set<Integer>> noSonarLinesByResource = Maps.newHashMap(); - private SensorContext context; - - public NoSonarFilter(SensorContext context) { - this.context = context; - } - - public void addResource(Resource model, Set<Integer> noSonarLines) { - if (model != null && noSonarLines != null) { - // Reload resource to handle backward compatibility of resource keys - Resource resource = context.getResource(model); - if (resource != null) { - noSonarLinesByResource.put(resource, noSonarLines); - } - } - } - - public boolean isIgnored(Violation violation) { - boolean ignored = false; - if (violation.getResource() != null && violation.getLineId() != null) { - Set<Integer> noSonarLines = noSonarLinesByResource.get(violation.getResource()); - ignored = noSonarLines != null && noSonarLines.contains(violation.getLineId()); - if (ignored && violation.getRule() != null && StringUtils.containsIgnoreCase(violation.getRule().getKey(), "nosonar")) { - ignored = false; - } - } - return ignored; - } -} diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/Category.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/Category.java index c8990213204..e4008f2ecea 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/Category.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/Category.java @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.api.config.internal; +package org.sonar.api.config; import org.apache.commons.lang.StringUtils; @@ -26,29 +26,29 @@ import java.util.Locale; /** * @since 3.7 */ -public class Category { +class Category { private final String originalKey; private final boolean special; - public Category(String originalKey) { + Category(String originalKey) { this(originalKey, false); } - public Category(String originalKey, boolean special) { + Category(String originalKey, boolean special) { this.originalKey = originalKey; this.special = special; } - public String originalKey() { + String originalKey() { return originalKey; } - public String key() { + String key() { return StringUtils.lowerCase(originalKey, Locale.ENGLISH); } - public boolean isSpecial() { + boolean isSpecial() { return special; } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java index 00b4af26138..5c20f786866 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/PropertyDefinitions.java @@ -24,8 +24,6 @@ import com.google.common.collect.Maps; import org.apache.commons.lang.StringUtils; import org.sonar.api.*; import org.sonar.api.Properties; -import org.sonar.api.config.internal.Category; -import org.sonar.api.config.internal.SubCategory; import org.sonar.api.utils.AnnotationUtils; import javax.annotation.Nullable; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java index f1832884616..cea246e73a8 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/Settings.java @@ -39,8 +39,9 @@ import java.util.Map; import java.util.Properties; /** - * Project Settings on batch side, Global Settings on server side. - * This component does not access to database, so property changed via setter methods are not persisted. + * Project settings on batch side, or global settings on server side. This component does not access to database, so + * property changed via setter methods are not persisted. + * <p/> * <p> * For testing, you can create a new empty {@link Settings} component using {@link #Settings()} and then * populate it using all variant of {@code setProperty}. <br/> diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/SubCategory.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/SubCategory.java index 8dfbcc16d10..05c96078eca 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/SubCategory.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/config/SubCategory.java @@ -17,19 +17,18 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -package org.sonar.api.config.internal; - +package org.sonar.api.config; /** * @since 3.7 */ -public class SubCategory extends Category { +class SubCategory extends Category { - public SubCategory(String originalKey) { + SubCategory(String originalKey) { super(originalKey); } - public SubCategory(String originalKey, boolean special) { + SubCategory(String originalKey, boolean special) { super(originalKey, special); } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/package-info.java b/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/package-info.java deleted file mode 100644 index 25458dc6179..00000000000 --- a/sonar-plugin-api/src/main/java/org/sonar/api/config/internal/package-info.java +++ /dev/null @@ -1,23 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -@ParametersAreNonnullByDefault -package org.sonar.api.config.internal; - -import javax.annotation.ParametersAreNonnullByDefault; |