aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-plugin-api/src/main/java/org/sonar
diff options
context:
space:
mode:
Diffstat (limited to 'sonar-plugin-api/src/main/java/org/sonar')
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/database/model/ResourceModel.java42
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/resources/Language.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/resources/Languages.java2
3 files changed, 25 insertions, 21 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/ResourceModel.java b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/ResourceModel.java
index 6191be4c9a7..b4731d84746 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/database/model/ResourceModel.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/database/model/ResourceModel.java
@@ -283,37 +283,37 @@ public class ResourceModel extends BaseIdentifiable implements Cloneable {
}
ResourceModel other = (ResourceModel) obj;
return new EqualsBuilder()
- .append(key, other.key)
- .append(enabled, other.enabled)
- .append(rootId, other.rootId)
- .isEquals();
+ .append(key, other.key)
+ .append(enabled, other.enabled)
+ .append(rootId, other.rootId)
+ .isEquals();
}
@Override
public int hashCode() {
return new HashCodeBuilder(17, 37)
- .append(key)
- .append(enabled)
- .append(rootId)
- .toHashCode();
+ .append(key)
+ .append(enabled)
+ .append(rootId)
+ .toHashCode();
}
@Override
public String toString() {
return new ToStringBuilder(this)
- .append("id", getId())
- .append("key", key)
- .append("scope", scope)
- .append("qualifier", qualifier)
- .append("name", name)
- .append("longName", longName)
- .append("lang", languageKey)
- .append("enabled", enabled)
- .append("rootId", rootId)
- .append("copyResourceId", copyResourceId)
- .append("personId", personId)
- .append("createdAt", createdAt)
- .toString();
+ .append("id", getId())
+ .append("key", key)
+ .append("scope", scope)
+ .append("qualifier", qualifier)
+ .append("name", name)
+ .append("longName", longName)
+ .append("lang", languageKey)
+ .append("enabled", enabled)
+ .append("rootId", rootId)
+ .append("copyResourceId", copyResourceId)
+ .append("personId", personId)
+ .append("createdAt", createdAt)
+ .toString();
}
@Override
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Language.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Language.java
index 44d46dd036b..9b484c0afcc 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Language.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Language.java
@@ -21,12 +21,14 @@ package org.sonar.api.resources;
import org.sonar.api.BatchExtension;
import org.sonar.api.ServerExtension;
+import org.sonar.api.batch.InstantiationStrategy;
/**
* The extension point to define a new language
*
* @since 1.10
*/
+@InstantiationStrategy(InstantiationStrategy.PER_BATCH)
public interface Language extends BatchExtension, ServerExtension {
/**
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Languages.java b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Languages.java
index 03b531d9d94..01fbc5ddedc 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/resources/Languages.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/resources/Languages.java
@@ -28,12 +28,14 @@ import com.google.common.collect.Maps;
import org.apache.commons.lang.ArrayUtils;
import org.sonar.api.BatchComponent;
import org.sonar.api.ServerComponent;
+import org.sonar.api.batch.InstantiationStrategy;
/**
* A class to store the list of languages
*
* @since 1.10
*/
+@InstantiationStrategy(InstantiationStrategy.PER_BATCH)
public class Languages implements BatchComponent, ServerComponent {
private final Map<String, Language> map = Maps.newHashMap();