aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsimonbrandhof <simon.brandhof@gmail.com>2011-05-26 08:33:18 +0200
committersimonbrandhof <simon.brandhof@gmail.com>2011-05-26 08:33:18 +0200
commit235d3e745d68bf549ce0c5353d76f936572f7c93 (patch)
tree0fffba766cbfb8f18d325685881a323e3cf5516d
parent27b6358cba309925505e09f4d44d3157435bf096 (diff)
downloadsonarqube-235d3e745d68bf549ce0c5353d76f936572f7c93.tar.gz
sonarqube-235d3e745d68bf549ce0c5353d76f936572f7c93.zip
SONAR-2469 fix typo in name of InstantiationStrategy class
-rw-r--r--plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/UnusedPrivateMethodCheck.java2
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionInstaller.java6
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionUtils.java6
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectExtensionInstaller.java4
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchExtensionInstallerTest.java8
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionUtilsTest.java30
-rw-r--r--sonar-core/src/main/java/org/sonar/jpa/dialect/DialectRepository.java2
-rw-r--r--sonar-plugin-api/src/main/java/org/sonar/api/batch/InstantiationStrategy.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/batch/InstanciationStrategy.java)6
8 files changed, 32 insertions, 32 deletions
diff --git a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/UnusedPrivateMethodCheck.java b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/UnusedPrivateMethodCheck.java
index f91fb6da9d7..6f4216d8b4d 100644
--- a/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/UnusedPrivateMethodCheck.java
+++ b/plugins/sonar-squid-java-plugin/src/main/java/org/sonar/java/bytecode/check/UnusedPrivateMethodCheck.java
@@ -33,7 +33,7 @@ import org.sonar.squid.api.SourceMethod;
"This helps in maintenance by decreasing the maintained code size, " +
"making it easier to understand the program and preventing bugs from being introduced.</p>" +
"<p>In the following two cases, private methods are not considered as dead code by Sonar :</p>" +
- "<ul><li>Private empty constructors that are intentionally used to prevent any direct instanciation of a class.</li>" +
+ "<ul><li>Private empty constructors that are intentionally used to prevent any direct instantiation of a class.</li>" +
"<li>Private methods : readObject(...), writeObject(...), writeReplace(...), readResolve(...) " +
"which can contractually be used when implementing the Serializable interface.</li></ul>")
public class UnusedPrivateMethodCheck extends BytecodeCheck {
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionInstaller.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionInstaller.java
index d111f444ec4..f176e1a81fc 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionInstaller.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchExtensionInstaller.java
@@ -23,7 +23,7 @@ import org.sonar.api.BatchComponent;
import org.sonar.api.ExtensionProvider;
import org.sonar.api.Plugin;
import org.sonar.api.batch.CoverageExtension;
-import org.sonar.api.batch.InstanciationStrategy;
+import org.sonar.api.batch.InstantiationStrategy;
import org.sonar.batch.bootstrapper.EnvironmentInformation;
import java.util.List;
@@ -64,9 +64,9 @@ public final class BatchExtensionInstaller implements BatchComponent {
void installExtension(Module module, Object extension) {
if (ExtensionUtils.isBatchExtension(extension) &&
ExtensionUtils.isSupportedEnvironment(extension, environment) &&
- ExtensionUtils.isInstantiationStrategy(extension, InstanciationStrategy.PER_BATCH)) {
+ ExtensionUtils.isInstantiationStrategy(extension, InstantiationStrategy.PER_BATCH)) {
if (ExtensionUtils.isType(extension, CoverageExtension.class)) {
- throw new IllegalArgumentException("Instantiation strategy " + InstanciationStrategy.PER_BATCH + " is not supported on CoverageExtension components: " + extension);
+ throw new IllegalArgumentException("Instantiation strategy " + InstantiationStrategy.PER_BATCH + " is not supported on CoverageExtension components: " + extension);
}
module.addComponent(extension);
}
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionUtils.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionUtils.java
index 01a7c809eca..a7907b6b08e 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionUtils.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ExtensionUtils.java
@@ -22,7 +22,7 @@ package org.sonar.batch.bootstrap;
import org.apache.commons.lang.StringUtils;
import org.sonar.api.BatchExtension;
import org.sonar.api.Extension;
-import org.sonar.api.batch.InstanciationStrategy;
+import org.sonar.api.batch.InstantiationStrategy;
import org.sonar.api.batch.SupportedEnvironment;
import org.sonar.api.utils.AnnotationUtils;
import org.sonar.batch.bootstrapper.EnvironmentInformation;
@@ -35,11 +35,11 @@ public final class ExtensionUtils {
static boolean isInstantiationStrategy(Object extension, String strategy) {
Class clazz = (extension instanceof Class ? (Class) extension : extension.getClass());
- InstanciationStrategy extStrategy = AnnotationUtils.getClassAnnotation(clazz, InstanciationStrategy.class);
+ InstantiationStrategy extStrategy = AnnotationUtils.getClassAnnotation(clazz, InstantiationStrategy.class);
if (extStrategy != null) {
return strategy.equals(extStrategy.value());
}
- return InstanciationStrategy.PER_PROJECT.equals(strategy);
+ return InstantiationStrategy.PER_PROJECT.equals(strategy);
}
static boolean isBatchExtension(Object extension) {
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectExtensionInstaller.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectExtensionInstaller.java
index 4d3faea35c0..bfb924cf7b4 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectExtensionInstaller.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/ProjectExtensionInstaller.java
@@ -26,7 +26,7 @@ import org.sonar.api.ExtensionProvider;
import org.sonar.api.Plugin;
import org.sonar.api.batch.AbstractCoverageExtension;
import org.sonar.api.batch.CoverageExtension;
-import org.sonar.api.batch.InstanciationStrategy;
+import org.sonar.api.batch.InstantiationStrategy;
import org.sonar.api.resources.Java;
import org.sonar.api.resources.Project;
import org.sonar.batch.bootstrapper.EnvironmentInformation;
@@ -71,7 +71,7 @@ public final class ProjectExtensionInstaller implements BatchComponent {
private Object installExtension(Module module, Object extension, Project project, String pluginKey) {
if (ExtensionUtils.isBatchExtension(extension) &&
ExtensionUtils.isSupportedEnvironment(extension, environment) &&
- ExtensionUtils.isInstantiationStrategy(extension, InstanciationStrategy.PER_PROJECT) &&
+ ExtensionUtils.isInstantiationStrategy(extension, InstantiationStrategy.PER_PROJECT) &&
!isDeactivatedCoverageExtension(extension, project, pluginKey)) {
module.addComponent(extension);
diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchExtensionInstallerTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchExtensionInstallerTest.java
index fbd29a90545..4f81bd34294 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchExtensionInstallerTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchExtensionInstallerTest.java
@@ -22,7 +22,7 @@ package org.sonar.batch.bootstrap;
import org.junit.Test;
import org.sonar.api.*;
import org.sonar.api.batch.CoverageExtension;
-import org.sonar.api.batch.InstanciationStrategy;
+import org.sonar.api.batch.InstantiationStrategy;
import org.sonar.batch.bootstrapper.EnvironmentInformation;
import java.util.Arrays;
@@ -93,7 +93,7 @@ public class BatchExtensionInstallerTest {
}
}
- @InstanciationStrategy(InstanciationStrategy.PER_BATCH)
+ @InstantiationStrategy(InstantiationStrategy.PER_BATCH)
public static class BatchService implements BatchExtension {
}
@@ -106,7 +106,7 @@ public class BatchExtensionInstallerTest {
}
- @InstanciationStrategy(InstanciationStrategy.PER_BATCH)
+ @InstantiationStrategy(InstantiationStrategy.PER_BATCH)
public static class BatchServiceProvider extends ExtensionProvider implements BatchExtension {
@Override
@@ -122,7 +122,7 @@ public class BatchExtensionInstallerTest {
}
}
- @InstanciationStrategy(InstanciationStrategy.PER_BATCH)
+ @InstantiationStrategy(InstantiationStrategy.PER_BATCH)
public static class InvalidCoverageExtension implements CoverageExtension {
// strategy PER_BATCH is not allowed
}
diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionUtilsTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionUtilsTest.java
index b29fd6831f3..40d3e8c9225 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionUtilsTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/ExtensionUtilsTest.java
@@ -22,7 +22,7 @@ package org.sonar.batch.bootstrap;
import org.junit.Test;
import org.sonar.api.BatchExtension;
import org.sonar.api.ServerExtension;
-import org.sonar.api.batch.InstanciationStrategy;
+import org.sonar.api.batch.InstantiationStrategy;
import org.sonar.api.batch.SupportedEnvironment;
import org.sonar.batch.bootstrapper.EnvironmentInformation;
@@ -33,22 +33,22 @@ public class ExtensionUtilsTest {
@Test
public void shouldBeBatchInstantiationStrategy() {
- assertThat(ExtensionUtils.isInstantiationStrategy(BatchService.class, InstanciationStrategy.PER_BATCH), is(true));
- assertThat(ExtensionUtils.isInstantiationStrategy(new BatchService(), InstanciationStrategy.PER_BATCH), is(true));
- assertThat(ExtensionUtils.isInstantiationStrategy(ProjectService.class, InstanciationStrategy.PER_BATCH), is(false));
- assertThat(ExtensionUtils.isInstantiationStrategy(new ProjectService(), InstanciationStrategy.PER_BATCH), is(false));
- assertThat(ExtensionUtils.isInstantiationStrategy(DefaultService.class, InstanciationStrategy.PER_BATCH), is(false));
- assertThat(ExtensionUtils.isInstantiationStrategy(new DefaultService(), InstanciationStrategy.PER_BATCH), is(false));
+ assertThat(ExtensionUtils.isInstantiationStrategy(BatchService.class, InstantiationStrategy.PER_BATCH), is(true));
+ assertThat(ExtensionUtils.isInstantiationStrategy(new BatchService(), InstantiationStrategy.PER_BATCH), is(true));
+ assertThat(ExtensionUtils.isInstantiationStrategy(ProjectService.class, InstantiationStrategy.PER_BATCH), is(false));
+ assertThat(ExtensionUtils.isInstantiationStrategy(new ProjectService(), InstantiationStrategy.PER_BATCH), is(false));
+ assertThat(ExtensionUtils.isInstantiationStrategy(DefaultService.class, InstantiationStrategy.PER_BATCH), is(false));
+ assertThat(ExtensionUtils.isInstantiationStrategy(new DefaultService(), InstantiationStrategy.PER_BATCH), is(false));
}
@Test
public void shouldBeProjectInstantiationStrategy() {
- assertThat(ExtensionUtils.isInstantiationStrategy(BatchService.class, InstanciationStrategy.PER_PROJECT), is(false));
- assertThat(ExtensionUtils.isInstantiationStrategy(new BatchService(), InstanciationStrategy.PER_PROJECT), is(false));
- assertThat(ExtensionUtils.isInstantiationStrategy(ProjectService.class, InstanciationStrategy.PER_PROJECT), is(true));
- assertThat(ExtensionUtils.isInstantiationStrategy(new ProjectService(), InstanciationStrategy.PER_PROJECT), is(true));
- assertThat(ExtensionUtils.isInstantiationStrategy(DefaultService.class, InstanciationStrategy.PER_PROJECT), is(true));
- assertThat(ExtensionUtils.isInstantiationStrategy(new DefaultService(), InstanciationStrategy.PER_PROJECT), is(true));
+ assertThat(ExtensionUtils.isInstantiationStrategy(BatchService.class, InstantiationStrategy.PER_PROJECT), is(false));
+ assertThat(ExtensionUtils.isInstantiationStrategy(new BatchService(), InstantiationStrategy.PER_PROJECT), is(false));
+ assertThat(ExtensionUtils.isInstantiationStrategy(ProjectService.class, InstantiationStrategy.PER_PROJECT), is(true));
+ assertThat(ExtensionUtils.isInstantiationStrategy(new ProjectService(), InstantiationStrategy.PER_PROJECT), is(true));
+ assertThat(ExtensionUtils.isInstantiationStrategy(DefaultService.class, InstantiationStrategy.PER_PROJECT), is(true));
+ assertThat(ExtensionUtils.isInstantiationStrategy(new DefaultService(), InstantiationStrategy.PER_PROJECT), is(true));
}
@Test
@@ -69,12 +69,12 @@ public class ExtensionUtilsTest {
assertThat(ExtensionUtils.isSupportedEnvironment(new BuildToolService(), new EnvironmentInformation("eclipse", "0.1")), is(false));
}
- @InstanciationStrategy(InstanciationStrategy.PER_BATCH)
+ @InstantiationStrategy(InstantiationStrategy.PER_BATCH)
public static class BatchService implements BatchExtension {
}
- @InstanciationStrategy(InstanciationStrategy.PER_PROJECT)
+ @InstantiationStrategy(InstantiationStrategy.PER_PROJECT)
public static class ProjectService implements BatchExtension {
}
diff --git a/sonar-core/src/main/java/org/sonar/jpa/dialect/DialectRepository.java b/sonar-core/src/main/java/org/sonar/jpa/dialect/DialectRepository.java
index 48d06331084..aa025b056e4 100644
--- a/sonar-core/src/main/java/org/sonar/jpa/dialect/DialectRepository.java
+++ b/sonar-core/src/main/java/org/sonar/jpa/dialect/DialectRepository.java
@@ -82,7 +82,7 @@ public final class DialectRepository {
} catch (ClassNotFoundException e) {
// dialectId was not a class name :)
} catch (Exception e) {
- throw new SonarException("Unable to instanciate dialect class", e);
+ throw new SonarException("Unable to instantiate dialect class", e);
}
return null;
}
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/batch/InstanciationStrategy.java b/sonar-plugin-api/src/main/java/org/sonar/api/batch/InstantiationStrategy.java
index 1701bc89cff..b270d9ce0d9 100644
--- a/sonar-plugin-api/src/main/java/org/sonar/api/batch/InstanciationStrategy.java
+++ b/sonar-plugin-api/src/main/java/org/sonar/api/batch/InstantiationStrategy.java
@@ -25,12 +25,12 @@ import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
- * Define instanciation strategy of batch extensions. If an extension is not annotated, then default value
- * is {@link org.sonar.api.batch.InstanciationStrategy#PER_PROJECT}.
+ * Define instantiation strategy of batch extensions. If an extension is not annotated, then default value
+ * is {@link org.sonar.api.batch.InstantiationStrategy#PER_PROJECT}.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
-public @interface InstanciationStrategy {
+public @interface InstantiationStrategy {
/**
* Shared extension. Lifecycle is the full analysis.