aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/Batch.java2
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityStatusWsRequest.java2
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/ce/TaskWsRequest.java2
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/component/BulkUpdateWsRequest.java3
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/component/UpdateWsRequest.java2
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/organization/CreateWsRequest.java5
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchWsRequest.java13
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateWsRequest.java22
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddProjectCreatorToTemplateWsRequest.java13
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveProjectCreatorFromTemplateWsRequest.java11
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/project/CreateRequest.java5
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/project/DeleteRequest.java5
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/project/SearchMyProjectsRequest.java10
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/CreateConditionRequest.java4
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/UpdateConditionRequest.java4
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/AddProjectRequest.java4
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/CreateRequest.java2
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RemoveProjectRequest.java4
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/serverid/GenerateRequest.java5
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/setting/ListDefinitionsRequest.java2
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/setting/ResetRequest.java2
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/setting/SetRequest.java2
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/setting/ValuesRequest.java2
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/user/CreateRequest.java4
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/user/UpdateRequest.java2
-rw-r--r--sonar-ws/src/main/java/org/sonarqube/ws/client/webhook/DeliveriesRequest.java2
26 files changed, 94 insertions, 40 deletions
diff --git a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/Batch.java b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/Batch.java
index 100016126d1..b526a3e95c3 100644
--- a/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/Batch.java
+++ b/sonar-scanner-engine/src/main/java/org/sonar/batch/bootstrapper/Batch.java
@@ -25,7 +25,7 @@ import com.google.common.collect.Maps;
import java.util.Collections;
import java.util.List;
import java.util.Map;
-import org.picocontainer.annotations.Nullable;
+import javax.annotation.Nullable;
import org.sonar.api.utils.MessageException;
import org.sonar.scanner.bootstrap.GlobalContainer;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityStatusWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityStatusWsRequest.java
index 66407145b75..8225ccb8c17 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityStatusWsRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/ActivityStatusWsRequest.java
@@ -22,7 +22,9 @@ package org.sonarqube.ws.client.ce;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
+@Immutable
public class ActivityStatusWsRequest {
private final String componentId;
private final String componentKey;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/TaskWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/TaskWsRequest.java
index 314b9dfa949..c2decb094fc 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/TaskWsRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/ce/TaskWsRequest.java
@@ -23,7 +23,9 @@ import com.google.common.collect.ImmutableList;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
+import javax.annotation.concurrent.Immutable;
+@Immutable
public class TaskWsRequest {
private final String taskUuid;
private final List<String> additionalFields;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/BulkUpdateWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/BulkUpdateWsRequest.java
index 881a8d0fe1a..113569efd26 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/BulkUpdateWsRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/BulkUpdateWsRequest.java
@@ -17,14 +17,15 @@
* 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.sonarqube.ws.client.component;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
import static com.google.common.base.Preconditions.checkArgument;
+@Immutable
public class BulkUpdateWsRequest {
private final String id;
private final String key;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/UpdateWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/UpdateWsRequest.java
index b93d4892c93..915fb75043d 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/component/UpdateWsRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/component/UpdateWsRequest.java
@@ -22,9 +22,11 @@ package org.sonarqube.ws.client.component;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
import static com.google.common.base.Preconditions.checkArgument;
+@Immutable
public class UpdateWsRequest {
private final String id;
private final String key;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/CreateWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/CreateWsRequest.java
index ab11c3d0be5..8bd20d32c1e 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/CreateWsRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/CreateWsRequest.java
@@ -19,6 +19,9 @@
*/
package org.sonarqube.ws.client.organization;
+import javax.annotation.concurrent.Immutable;
+
+@Immutable
public class CreateWsRequest {
private final String name;
private final String key;
@@ -26,7 +29,7 @@ public class CreateWsRequest {
private final String url;
private final String avatar;
- public CreateWsRequest(Builder builder) {
+ private CreateWsRequest(Builder builder) {
this.name = builder.name;
this.key = builder.key;
this.description = builder.description;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchWsRequest.java
index 3be9f9c0515..af412e7dba2 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchWsRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/SearchWsRequest.java
@@ -19,19 +19,26 @@
*/
package org.sonarqube.ws.client.organization;
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
+
+@Immutable
public class SearchWsRequest {
private final Integer page;
private final Integer pageSize;
- public SearchWsRequest(Builder builder) {
+ private SearchWsRequest(Builder builder) {
this.page = builder.page;
this.pageSize = builder.pageSize;
}
+ @CheckForNull
public Integer getPageSize() {
return pageSize;
}
+ @CheckForNull
public Integer getPage() {
return page;
}
@@ -40,12 +47,12 @@ public class SearchWsRequest {
private Integer page;
private Integer pageSize;
- public Builder setPage(Integer page) {
+ public Builder setPage(@Nullable Integer page) {
this.page = page;
return this;
}
- public Builder setPageSize(Integer pageSize) {
+ public Builder setPageSize(@Nullable Integer pageSize) {
this.pageSize = pageSize;
return this;
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateWsRequest.java
index 8167282d509..a1355e36b68 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateWsRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/organization/UpdateWsRequest.java
@@ -19,6 +19,11 @@
*/
package org.sonarqube.ws.client.organization;
+import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
+
+@Immutable
public class UpdateWsRequest {
private final String key;
private final String name;
@@ -26,7 +31,7 @@ public class UpdateWsRequest {
private final String url;
private final String avatar;
- public UpdateWsRequest(Builder builder) {
+ private UpdateWsRequest(Builder builder) {
this.name = builder.name;
this.key = builder.key;
this.description = builder.description;
@@ -34,22 +39,27 @@ public class UpdateWsRequest {
this.avatar = builder.avatar;
}
+ @CheckForNull
public String getName() {
return name;
}
+ @CheckForNull
public String getKey() {
return key;
}
+ @CheckForNull
public String getDescription() {
return description;
}
+ @CheckForNull
public String getUrl() {
return url;
}
+ @CheckForNull
public String getAvatar() {
return avatar;
}
@@ -61,27 +71,27 @@ public class UpdateWsRequest {
private String url;
private String avatar;
- public Builder setKey(String key) {
+ public Builder setKey(@Nullable String key) {
this.key = key;
return this;
}
- public Builder setName(String name) {
+ public Builder setName(@Nullable String name) {
this.name = name;
return this;
}
- public Builder setDescription(String description) {
+ public Builder setDescription(@Nullable String description) {
this.description = description;
return this;
}
- public Builder setUrl(String url) {
+ public Builder setUrl(@Nullable String url) {
this.url = url;
return this;
}
- public Builder setAvatar(String avatar) {
+ public Builder setAvatar(@Nullable String avatar) {
this.avatar = avatar;
return this;
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddProjectCreatorToTemplateWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddProjectCreatorToTemplateWsRequest.java
index cd8c2747e95..3354babafbf 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddProjectCreatorToTemplateWsRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/AddProjectCreatorToTemplateWsRequest.java
@@ -21,16 +21,19 @@
package org.sonarqube.ws.client.permission;
import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
import static java.util.Objects.requireNonNull;
+@Immutable
public class AddProjectCreatorToTemplateWsRequest {
private final String templateId;
private final String organization;
private final String templateName;
private final String permission;
- public AddProjectCreatorToTemplateWsRequest(Builder builder) {
+ private AddProjectCreatorToTemplateWsRequest(Builder builder) {
this.templateId = builder.templateId;
this.organization = builder.organization;
this.templateName = builder.templateName;
@@ -70,22 +73,22 @@ public class AddProjectCreatorToTemplateWsRequest {
// enforce method constructor
}
- public Builder setTemplateId(String templateId) {
+ public Builder setTemplateId(@Nullable String templateId) {
this.templateId = templateId;
return this;
}
- public Builder setOrganization(String s) {
+ public Builder setOrganization(@Nullable String s) {
this.organization = s;
return this;
}
- public Builder setTemplateName(String templateName) {
+ public Builder setTemplateName(@Nullable String templateName) {
this.templateName = templateName;
return this;
}
- public Builder setPermission(String permission) {
+ public Builder setPermission(@Nullable String permission) {
this.permission = permission;
return this;
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveProjectCreatorFromTemplateWsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveProjectCreatorFromTemplateWsRequest.java
index 798374831cc..41f5f7d0980 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveProjectCreatorFromTemplateWsRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/permission/RemoveProjectCreatorFromTemplateWsRequest.java
@@ -21,9 +21,12 @@
package org.sonarqube.ws.client.permission;
import javax.annotation.CheckForNull;
+import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
import static java.util.Objects.requireNonNull;
+@Immutable
public class RemoveProjectCreatorFromTemplateWsRequest {
private final String templateId;
private final String organization;
@@ -70,22 +73,22 @@ public class RemoveProjectCreatorFromTemplateWsRequest {
// enforce method constructor
}
- public Builder setTemplateId(String templateId) {
+ public Builder setTemplateId(@Nullable String templateId) {
this.templateId = templateId;
return this;
}
- public Builder setOrganization(String s) {
+ public Builder setOrganization(@Nullable String s) {
this.organization = s;
return this;
}
- public Builder setTemplateName(String templateName) {
+ public Builder setTemplateName(@Nullable String templateName) {
this.templateName = templateName;
return this;
}
- public Builder setPermission(String permission) {
+ public Builder setPermission(@Nullable String permission) {
this.permission = permission;
return this;
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/project/CreateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/project/CreateRequest.java
index 698d7666904..b68e7746999 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/project/CreateRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/project/CreateRequest.java
@@ -21,10 +21,9 @@ package org.sonarqube.ws.client.project;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
-/**
- * @since 5.5
- */
+@Immutable
public class CreateRequest {
private final String key;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/project/DeleteRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/project/DeleteRequest.java
index 5a0df28686a..6e549cd000e 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/project/DeleteRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/project/DeleteRequest.java
@@ -21,10 +21,9 @@ package org.sonarqube.ws.client.project;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
-/**
- * @since 5.5
- */
+@Immutable
public class DeleteRequest {
private final String id;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/project/SearchMyProjectsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/project/SearchMyProjectsRequest.java
index b93f940e28a..e73c3a1a58a 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/project/SearchMyProjectsRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/project/SearchMyProjectsRequest.java
@@ -22,13 +22,15 @@ package org.sonarqube.ws.client.project;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
+@Immutable
public class SearchMyProjectsRequest {
private final String query;
private final Integer page;
private final Integer pageSize;
- public SearchMyProjectsRequest(Builder builder) {
+ private SearchMyProjectsRequest(Builder builder) {
this.query = builder.query;
this.page = builder.page;
this.pageSize = builder.pageSize;
@@ -39,10 +41,12 @@ public class SearchMyProjectsRequest {
return query;
}
+ @CheckForNull
public Integer getPage() {
return page;
}
+ @CheckForNull
public Integer getPageSize() {
return pageSize;
}
@@ -65,12 +69,12 @@ public class SearchMyProjectsRequest {
return this;
}
- public Builder setPage(Integer page) {
+ public Builder setPage(@Nullable Integer page) {
this.page = page;
return this;
}
- public Builder setPageSize(Integer pageSize) {
+ public Builder setPageSize(@Nullable Integer pageSize) {
this.pageSize = pageSize;
return this;
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/CreateConditionRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/CreateConditionRequest.java
index 5c4334420ef..7fb3468040a 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/CreateConditionRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/CreateConditionRequest.java
@@ -21,10 +21,12 @@ package org.sonarqube.ws.client.qualitygate;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Strings.isNullOrEmpty;
+@Immutable
public class CreateConditionRequest {
private final long qualityGateId;
@@ -34,7 +36,7 @@ public class CreateConditionRequest {
private final String error;
private final Integer period;
- public CreateConditionRequest(Builder builder) {
+ private CreateConditionRequest(Builder builder) {
this.qualityGateId = builder.qualityGateId;
this.metricKey = builder.metricKey;
this.operator = builder.operator;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/UpdateConditionRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/UpdateConditionRequest.java
index 13abf90feda..f723569d345 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/UpdateConditionRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualitygate/UpdateConditionRequest.java
@@ -21,10 +21,12 @@ package org.sonarqube.ws.client.qualitygate;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Strings.isNullOrEmpty;
+@Immutable
public class UpdateConditionRequest {
private final long conditionId;
@@ -34,7 +36,7 @@ public class UpdateConditionRequest {
private final String error;
private final Integer period;
- public UpdateConditionRequest(Builder builder) {
+ private UpdateConditionRequest(Builder builder) {
this.conditionId = builder.conditionId;
this.metricKey = builder.metricKey;
this.operator = builder.operator;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/AddProjectRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/AddProjectRequest.java
index 8e6c7f8d6cb..80a1bbaac3a 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/AddProjectRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/AddProjectRequest.java
@@ -21,7 +21,9 @@ package org.sonarqube.ws.client.qualityprofile;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
+@Immutable
public class AddProjectRequest {
private final String language;
@@ -30,7 +32,7 @@ public class AddProjectRequest {
private final String projectKey;
private final String projectUuid;
- public AddProjectRequest(Builder builder) {
+ private AddProjectRequest(Builder builder) {
this.language = builder.language;
this.profileName = builder.profileName;
this.profileKey = builder.profileKey;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/CreateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/CreateRequest.java
index 9b7bfd9b12a..b08beec951b 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/CreateRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/CreateRequest.java
@@ -20,9 +20,11 @@
package org.sonarqube.ws.client.qualityprofile;
import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
import static com.google.common.base.Preconditions.checkArgument;
+@Immutable
public class CreateRequest {
private final String profileName;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RemoveProjectRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RemoveProjectRequest.java
index 2dd936066f9..0505c524d05 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RemoveProjectRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/qualityprofile/RemoveProjectRequest.java
@@ -21,7 +21,9 @@ package org.sonarqube.ws.client.qualityprofile;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
+@Immutable
public class RemoveProjectRequest {
private final String language;
@@ -30,7 +32,7 @@ public class RemoveProjectRequest {
private final String projectKey;
private final String projectUuid;
- public RemoveProjectRequest(Builder builder) {
+ private RemoveProjectRequest(Builder builder) {
this.language = builder.language;
this.profileName = builder.profileName;
this.profileKey = builder.profileKey;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/serverid/GenerateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/serverid/GenerateRequest.java
index 57b29d62b15..287500efadc 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/serverid/GenerateRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/serverid/GenerateRequest.java
@@ -20,13 +20,16 @@
package org.sonarqube.ws.client.serverid;
+import javax.annotation.concurrent.Immutable;
+
import static com.google.common.base.Preconditions.checkArgument;
+@Immutable
public class GenerateRequest {
private final String organization;
private final String ip;
- public GenerateRequest(Builder builder) {
+ private GenerateRequest(Builder builder) {
this.organization = builder.organization;
this.ip = builder.ip;
}
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/setting/ListDefinitionsRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/setting/ListDefinitionsRequest.java
index bace689f91a..7aee9357e7f 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/setting/ListDefinitionsRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/setting/ListDefinitionsRequest.java
@@ -22,7 +22,9 @@ package org.sonarqube.ws.client.setting;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
+@Immutable
public class ListDefinitionsRequest {
private final String componentId;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/setting/ResetRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/setting/ResetRequest.java
index e999dde79b9..451491f0971 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/setting/ResetRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/setting/ResetRequest.java
@@ -32,7 +32,7 @@ public class ResetRequest {
private final String componentId;
private final String componentKey;
- public ResetRequest(Builder builder) {
+ private ResetRequest(Builder builder) {
this.keys = builder.keys;
this.componentId = builder.componentId;
this.componentKey = builder.componentKey;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/setting/SetRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/setting/SetRequest.java
index d427fd0d9e1..d8c91fe2d64 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/setting/SetRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/setting/SetRequest.java
@@ -35,7 +35,7 @@ public class SetRequest {
private final String componentId;
private final String componentKey;
- public SetRequest(Builder builder) {
+ private SetRequest(Builder builder) {
this.key = builder.key;
this.value = builder.value;
this.values = builder.values;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/setting/ValuesRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/setting/ValuesRequest.java
index 3c1d8d212a3..788490a2820 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/setting/ValuesRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/setting/ValuesRequest.java
@@ -36,7 +36,7 @@ public class ValuesRequest {
private final String componentKey;
private final List<String> keys;
- public ValuesRequest(Builder builder) {
+ private ValuesRequest(Builder builder) {
this.componentId = builder.componentId;
this.componentKey = builder.componentKey;
this.keys = builder.keys;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/user/CreateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/user/CreateRequest.java
index 4144497bc86..eb316558e22 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/user/CreateRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/user/CreateRequest.java
@@ -23,11 +23,13 @@ package org.sonarqube.ws.client.user;
import java.util.List;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
import static com.google.common.base.Preconditions.checkArgument;
import static com.google.common.base.Strings.isNullOrEmpty;
import static java.util.Collections.emptyList;
+@Immutable
public class CreateRequest {
private final String login;
@@ -36,7 +38,7 @@ public class CreateRequest {
private final String email;
private final List<String> scmAccounts;
- public CreateRequest(Builder builder) {
+ private CreateRequest(Builder builder) {
this.login = builder.login;
this.password = builder.password;
this.name = builder.name;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/user/UpdateRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/user/UpdateRequest.java
index 87757cce4e2..2cb876a3fd8 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/user/UpdateRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/user/UpdateRequest.java
@@ -35,7 +35,7 @@ public class UpdateRequest {
private final String email;
private final List<String> scmAccounts;
- public UpdateRequest(Builder builder) {
+ private UpdateRequest(Builder builder) {
this.login = builder.login;
this.name = builder.name;
this.email = builder.email;
diff --git a/sonar-ws/src/main/java/org/sonarqube/ws/client/webhook/DeliveriesRequest.java b/sonar-ws/src/main/java/org/sonarqube/ws/client/webhook/DeliveriesRequest.java
index af9ad99940c..165a37b333a 100644
--- a/sonar-ws/src/main/java/org/sonarqube/ws/client/webhook/DeliveriesRequest.java
+++ b/sonar-ws/src/main/java/org/sonarqube/ws/client/webhook/DeliveriesRequest.java
@@ -21,7 +21,9 @@ package org.sonarqube.ws.client.webhook;
import javax.annotation.CheckForNull;
import javax.annotation.Nullable;
+import javax.annotation.concurrent.Immutable;
+@Immutable
public class DeliveriesRequest {
private final String componentKey;