Deprecate former constructor. Remove comment.
package io.jenkins.plugins.analysis.core.restapi;
+import java.util.Collections;
import java.util.Map;
import edu.hm.hafner.analysis.Severity;
@@ -22,6 +23,25 @@ public class ToolApi {
private final int size;
private final Map<Severity, Integer> sizePerSeverity;
+ /**
+ * Creates a new instance of {@link ToolApi}.
+ *
+ * @param id
+ * unique ID of the tool
+ * @param name
+ * human readable name of the tool
+ * @param latestUrl
+ * the URL to the latest results
+ * @param size
+ * the number of warnings
+ * @deprecated
+ * use {@link #ToolApi(String, String, String, int, Map)} instead.
+ */
+ @Deprecated
+ public ToolApi(final String id, final String name, final String latestUrl, final int size) {
+ this(name, id, latestUrl, size, Collections.emptyMap());
+ }
+
/**
* Creates a new instance of {@link ToolApi}.
*
@@ -34,9 +54,7 @@ public class ToolApi {
* @param size
* the number of warnings
* @param sizePerSeverity
- * the number of warnings, grouped by severity. Assumption is that
- * this is not null, and that it is properly populated with counts
- * that when summed, total the "size" parameter.
+ * the number of warnings, grouped by severity.
*/
public ToolApi(final String id, final String name, final String latestUrl, final int size, final Map<Severity, Integer> sizePerSeverity) {
this.name = name;
