aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2016-04-15 09:49:24 +0200
committerSimon Brandhof <simon.brandhof@sonarsource.com>2016-04-15 09:49:34 +0200
commit378d6b7916c97849e83eb3f77d1a9a259d4b3d50 (patch)
tree3dc1f2c122e83066d278957409a3ba1242138006 /sonar-plugin-api
parente328fb0091fc78011b5ffe30942620ce5bff1467 (diff)
downloadsonarqube-378d6b7916c97849e83eb3f77d1a9a259d4b3d50.tar.gz
sonarqube-378d6b7916c97849e83eb3f77d1a9a259d4b3d50.zip
Fix malformed javadoc in API
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/debt/DebtModel.java5
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/events/InitializersPhaseHandler.java5
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/ce/measure/MeasureComputer.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/i18n/I18n.java13
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerUpgradeStatus.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/server/authentication/IdentityProvider.java4
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/utils/TempFolder.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/utils/XpathParser.java40
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/utils/text/JsonWriter.java7
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/web/PageDecoration.java12
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsWebservice.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperty.java4
12 files changed, 48 insertions, 50 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/debt/DebtModel.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/debt/DebtModel.java
index d7e156d246b..fe6e0b4dbea 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/debt/DebtModel.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/debt/DebtModel.java
@@ -19,15 +19,14 @@
*/
package org.sonar.api.batch.debt;
-import javax.annotation.CheckForNull;
-
import java.util.List;
+import javax.annotation.CheckForNull;
/**
* This class can be used to retrieve characteristics or sub-characteristics from the technical debt model during analysis.
*
* Unfortunately, this class cannot be used to set characteristic on {@link org.sonar.api.measures.Measure},
- * because the Measure API still uses deprecated {@link org.sonar.api.technicaldebt.batch.Characteristic}.
+ * because the Measure API still uses deprecated {@code org.sonar.api.technicaldebt.batch.Characteristic}.
*
* @since 4.3
* @deprecated since 5.1 debt model will soon be unavailable on batch side
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/events/InitializersPhaseHandler.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/events/InitializersPhaseHandler.java
index 52a242c6d15..8ac2876e933 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/events/InitializersPhaseHandler.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/events/InitializersPhaseHandler.java
@@ -19,9 +19,8 @@
*/
package org.sonar.api.batch.events;
-import org.sonar.api.batch.Initializer;
-
import java.util.List;
+import org.sonar.api.batch.Initializer;
/**
* @since 3.7
@@ -45,7 +44,7 @@ public interface InitializersPhaseHandler extends EventHandler {
}
/**
- * Called before and after execution of all {@link Initializers}s.
+ * Called before and after execution of all {@link Initializer}s.
*/
void onInitializersPhase(InitializersPhaseEvent event);
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/ce/measure/MeasureComputer.java b/sonar-plugin-api/src/main/java/org/sonar/api/ce/measure/MeasureComputer.java
index ab3b876d79d..5a33360e05b 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/ce/measure/MeasureComputer.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/ce/measure/MeasureComputer.java
@@ -52,7 +52,7 @@ import org.sonar.api.ce.measure.MeasureComputer.MeasureComputerDefinition.Builde
* public void compute(MeasureComputerContext context) {
* int ncloc = context.getMeasure("ncloc");
* List&lt;Issue&gt; issues = context.getIssues();
- * if (ncloc != null && !issues.isEmpty()) {
+ * if (ncloc != null &amp;&amp; !issues.isEmpty()) {
* double value = issues.size() / ncloc;
* context.addMeasure("my_new_metric", value);
* }
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/i18n/I18n.java b/sonar-plugin-api/src/main/java/org/sonar/api/i18n/I18n.java
index c696b22e201..df37c340bb9 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/i18n/I18n.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/i18n/I18n.java
@@ -88,8 +88,10 @@ public interface I18n {
/**
* Return the formatted datetime.
- * <br>
- * Example : formatDateTime(Locale.ENGLISH, DateUtils.parseDateTime("2014-01-22T19:10:03+0100")) -> Jan 22, 2014 7:10 PM
+ * <p>
+ * Example: {@code formatDateTime(Locale.ENGLISH, DateUtils.parseDateTime("2014-01-22T19:10:03+0100"))}
+ * returns {@code "Jan 22, 2014 7:10 PM"}.
+ * </p>
*
* @since 4.2
*/
@@ -98,7 +100,8 @@ public interface I18n {
/**
* Return the formatted date.
* <br>
- * Example : formatDateTime(Locale.ENGLISH, DateUtils.parseDateTime("2014-01-22")) -> Jan 22, 2014
+ * Example: {@code formatDateTime(Locale.ENGLISH, DateUtils.parseDateTime("2014-01-22"))}
+ * returns {@code "Jan 22, 2014"}.
*
* @since 4.2
*/
@@ -107,7 +110,7 @@ public interface I18n {
/**
* Return the formatted decimal, with always one fraction digit.
* <br>
- * Example : formatDouble(Locale.FRENCH, 10.56) -> 10,6
+ * Example: {@code formatDouble(Locale.FRENCH, 10.56)} returns {@code "10,6"}.
*
* @since 4.4
*/
@@ -116,7 +119,7 @@ public interface I18n {
/**
* Return the formatted integer.
* <br>
- * Example : formatInteger(Locale.ENGLISH, 100000) -> 100,000
+ * Example: {@code formatInteger(Locale.ENGLISH, 100000)} returns {@code "100,000"}.
*
* @since 4.4
*/
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerUpgradeStatus.java b/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerUpgradeStatus.java
index 7751060a6c7..80359a835f6 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerUpgradeStatus.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/platform/ServerUpgradeStatus.java
@@ -40,7 +40,7 @@ public interface ServerUpgradeStatus {
boolean isFreshInstall();
/**
- * The database version before the server startup. Returns <=0 if db created from scratch.
+ * The database version before the server startup. Returns a non-zero negative value if db created from scratch.
*/
int getInitialDbVersion();
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/server/authentication/IdentityProvider.java b/sonar-plugin-api/src/main/java/org/sonar/api/server/authentication/IdentityProvider.java
index f1b43ba1b2c..78ac0a2d6ef 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/server/authentication/IdentityProvider.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/server/authentication/IdentityProvider.java
@@ -25,8 +25,8 @@ import org.sonar.api.server.ServerSide;
* Entry-point to define a new Identity provider.
* Only one of this two interfaces can be used :
* <ul>
- * <li>{@link OAuth2IdentityProvider}</li> for OAuth2 authentication
- * <li>{@link BaseIdentityProvider}</li> for other kind of authentication
+ * <li>{@link OAuth2IdentityProvider} for OAuth2 authentication</li>
+ * <li>{@link BaseIdentityProvider} for other kind of authentication</li>
* </ul>
*
* @since 5.4
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/TempFolder.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/TempFolder.java
index a1cd561677f..da16a352447 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/TempFolder.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/TempFolder.java
@@ -30,7 +30,7 @@ import org.sonar.api.server.ServerSide;
* depends on situation:
* <ul>
* <li>${SONAR_HOME}/temp on server side</li>
- * <li>${SONAR_HOME}/.sonartmp<rnd> on the batch side</li>
+ * <li>${SONAR_HOME}/.sonartmp on scanner side</li>
* </ul>
* @since 4.0
*
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/XpathParser.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/XpathParser.java
index a202004989e..df350a4893b 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/XpathParser.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/XpathParser.java
@@ -19,26 +19,6 @@
*/
package org.sonar.api.utils;
-import org.apache.commons.io.IOUtils;
-import org.sonar.api.utils.log.Logger;
-import org.sonar.api.utils.log.Loggers;
-import org.w3c.dom.Document;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-import org.xml.sax.SAXException;
-
-import javax.annotation.Nullable;
-import javax.xml.namespace.QName;
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.xpath.XPath;
-import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathExpression;
-import javax.xml.xpath.XPathExpressionException;
-import javax.xml.xpath.XPathFactory;
-
import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.File;
@@ -53,6 +33,24 @@ import java.util.List;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
+import javax.annotation.Nullable;
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpression;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+import org.apache.commons.io.IOUtils;
+import org.sonar.api.utils.log.Logger;
+import org.sonar.api.utils.log.Loggers;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
/**
* XML Parsing tool using XPATH. It's recommended to use StaxParser when parsing big XML files.
@@ -260,7 +258,7 @@ public class XpathParser {
/**
* Fix the error occured when parsing a string containing unicode character
- * Example : &u20ac; will be replaced by &#x20ac;
+ * Example : {@code &u20ac;} will be replaced by {@code &#x20ac;}
*/
protected String fixUnicodeChar(String text) {
String unicode = "&u";
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/JsonWriter.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/JsonWriter.java
index 7658439803c..bea1dcc2d27 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/JsonWriter.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/text/JsonWriter.java
@@ -19,12 +19,11 @@
*/
package org.sonar.api.utils.text;
-import org.sonar.api.utils.DateUtils;
-
-import javax.annotation.Nullable;
import java.io.Writer;
import java.util.Date;
import java.util.Map;
+import javax.annotation.Nullable;
+import org.sonar.api.utils.DateUtils;
/**
* Writes JSON as a stream. This class allows plugins to not directly depend
@@ -208,7 +207,7 @@ public class JsonWriter {
* <ul>
* <li>primitive types: String, Number, Boolean</li>
* <li>java.util.Date: encoded as datetime (see {@link #valueDateTime(java.util.Date)}</li>
- * <li><code>Map<Object, Object></code>. Method toString is called for the key.</li>
+ * <li>{@code Map<Object, Object>}. Method toString is called for the key.</li>
* <li>Iterable</li>
* </ul>
*
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/PageDecoration.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/PageDecoration.java
index 73edeb1dc6f..963759254db 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/web/PageDecoration.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/PageDecoration.java
@@ -34,13 +34,13 @@ import org.sonar.api.server.ServerSide;
*
* <p>Example of template:
<pre>
- <% content_for :script do %>
- <script>alert('page loaded')</script>
- <% end %>
+ &lt;% content_for :script do %&gt;
+ &lt;script&gt;alert('page loaded')&lt;/script&gt;
+ &lt;% end %&gt;
- <% content_for :footer do %>
- <div>this is <b>my footer</b></div>
-<% end %>
+ &lt;% content_for :footer do %&gt;
+ &lt;div&gt;this is &lt;b&gt;my footer&lt;/b&gt;&lt;/div&gt;
+&lt;% end %&gt;
</pre>
*
* @since 3.3
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsWebservice.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsWebservice.java
index 9178f9bddf9..e09bcf9b34c 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsWebservice.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/RubyRailsWebservice.java
@@ -23,7 +23,7 @@ package org.sonar.api.web;
/**
* Interface to create a web service by implementing a Ruby On Rails controller.
* The method getTemplate() return the ROR controller code, the name of the controller class defined in the template
- * MUST match the following name scheme : Api::$Webservice.getId()Controller I.E : Webservice.getId() = TestWS > Api::TestWSController.
+ * MUST match the following name scheme : Api::$Webservice.getId()Controller I.E : Webservice.getId() = TestWS &gt; Api::TestWSController.
* The plugin will be deployed with the following URL scheme: http://sonarhost/api/plugins/$Webservice.getId()/:action/:id
* :action is the name of the controller method to call, :id is a param that will be passed to the controller, these 2 params are not mandatory
* and will call the index controller method if not specified.
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperty.java b/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperty.java
index f547a7d5fa3..5003381681e 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperty.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/web/WidgetProperty.java
@@ -39,7 +39,7 @@ public @interface WidgetProperty {
boolean optional() default true;
/**
- * @since 3.3 Options for property of type WidgetPropertyType.METRIC</code>.
+ * @since 3.3 Options for property of type {@link WidgetPropertyType#METRIC}.
*
* If no option is specified, any metric will match.
* If options are specified, all must match for the metric to be displayed.
@@ -48,7 +48,7 @@ public @interface WidgetProperty {
* For example <code>type:INT,FLOAT</code> will match any metric of type <code>INT</code> or <code>FLOAT</code>.
* For example <code>type:NUMERIC</code> will match any metric of numerictype.
*
- * @since 3.5 Options for property of type WidgetPropertyType.SINGLE_SELECT_LIST</code>
+ * @since 3.5 Options for property of type {@link WidgetPropertyType#SINGLE_SELECT_LIST}.
* For example {"property_1", "property_3", "property_3"}).
*
*/