diff options
-rw-r--r-- | plugins/sonar-squid-java-plugin/pom.xml | 5 | ||||
-rw-r--r-- | sonar-deprecated/pom.xml | 14 | ||||
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/AnnotationCheckerFactory.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/checkers/AnnotationCheckerFactory.java) | 5 | ||||
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/CheckerFactory.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/checkers/CheckerFactory.java) | 4 | ||||
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/MessageDispatcher.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/checkers/MessageDispatcher.java) | 5 | ||||
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/UnvalidCheckerException.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/checkers/UnvalidCheckerException.java) | 5 | ||||
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactory.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactory.java) | 5 | ||||
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/Check.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/profiles/Check.java) | 4 | ||||
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfile.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/profiles/CheckProfile.java) | 5 | ||||
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfileProvider.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/profiles/CheckProfileProvider.java) | 4 | ||||
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshaller.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshaller.java) | 4 | ||||
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactory.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactory.java) | 4 | ||||
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplate.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplate.java) | 6 | ||||
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplateProperty.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplateProperty.java) | 5 | ||||
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplate.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/CheckTemplate.java) | 6 | ||||
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateFactory.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/CheckTemplateFactory.java) | 5 | ||||
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateProperty.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/CheckTemplateProperty.java) | 6 | ||||
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepositories.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepositories.java) | 4 | ||||
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepository.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepository.java) | 6 | ||||
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplate.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplate.java) | 0 | ||||
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplateProperty.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplateProperty.java) | 0 | ||||
-rw-r--r-- | sonar-deprecated/src/main/java/org/sonar/api/checks/templates/XmlCheckTemplateFactory.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/XmlCheckTemplateFactory.java) | 0 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/AnnotationCheckerFactoryTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/checks/checkers/AnnotationCheckerFactoryTest.java) | 74 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckWithUnsupportedPropertyType.java | 21 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithIntegerProperty.java | 17 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithPrimitiveProperties.java | 31 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithStringProperty.java | 24 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithoutProperties.java | 29 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactoryTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactoryTest.java) | 44 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckProfileTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/checks/profiles/CheckProfileTest.java) | 0 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshallerTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshallerTest.java) | 0 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/checks/profiles/CheckTest.java) | 0 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/FakeCheckOne.java | 18 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/FakeCheckTwo.java | 22 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/samples/AnnotatedCheckWithBundles.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/checks/samples/AnnotatedCheckWithBundles.java) | 0 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/samples/DetailedAnnotatedCheck.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/checks/samples/DetailedAnnotatedCheck.java) | 0 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/samples/I18nCheckWithAlternativeBundle.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/checks/samples/I18nCheckWithAlternativeBundle.java) | 0 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/samples/I18nCheckWithoutDefaultLocale.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/checks/samples/I18nCheckWithoutDefaultLocale.java) | 0 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/samples/SimpleAnnotatedCheck.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/checks/samples/SimpleAnnotatedCheck.java) | 0 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactoryTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactoryTest.java) | 0 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/templates/BundleCheckTemplateTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/checks/templates/BundleCheckTemplateTest.java) | 0 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/templates/CheckTemplateRepositoriesTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/checks/templates/CheckTemplateRepositoriesTest.java) | 0 | ||||
-rw-r--r-- | sonar-deprecated/src/test/java/org/sonar/api/checks/templates/DefaultCheckTemplateTest.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/checks/templates/DefaultCheckTemplateTest.java) | 0 | ||||
-rw-r--r-- | sonar-deprecated/src/test/resources/org/sonar/api/checks/profiles/CheckProfileXmlMarshallerTest/profile.xml (renamed from sonar-plugin-api/src/test/resources/org/sonar/api/checks/profiles/CheckProfileXmlMarshallerTest/profile.xml) | 0 | ||||
-rw-r--r-- | sonar-deprecated/src/test/resources/org/sonar/api/checks/samples/AnnotatedCheckWithBundles.properties (renamed from sonar-plugin-api/src/test/resources/org/sonar/api/checks/samples/AnnotatedCheckWithBundles.properties) | 0 | ||||
-rw-r--r-- | sonar-deprecated/src/test/resources/org/sonar/api/checks/samples/AnnotatedCheckWithBundles_fr.properties (renamed from sonar-plugin-api/src/test/resources/org/sonar/api/checks/samples/AnnotatedCheckWithBundles_fr.properties) | 0 | ||||
-rw-r--r-- | sonar-deprecated/src/test/resources/org/sonar/api/checks/samples/I18nCheckWithoutDefaultLocale_fr.properties (renamed from sonar-plugin-api/src/test/resources/org/sonar/api/checks/samples/I18nCheckWithoutDefaultLocale_fr.properties) | 0 | ||||
-rw-r--r-- | sonar-deprecated/src/test/resources/org/sonar/api/checks/samples/alternative/path/AlternativeBundle.properties (renamed from sonar-plugin-api/src/test/resources/org/sonar/api/checks/samples/alternative/path/AlternativeBundle.properties) | 0 | ||||
-rw-r--r-- | sonar-server/src/main/java/org/sonar/server/rules/ProfilesConsole.java | 2 |
49 files changed, 251 insertions, 133 deletions
diff --git a/plugins/sonar-squid-java-plugin/pom.xml b/plugins/sonar-squid-java-plugin/pom.xml index 5aa593bfa01..5c7a147a65f 100644 --- a/plugins/sonar-squid-java-plugin/pom.xml +++ b/plugins/sonar-squid-java-plugin/pom.xml @@ -16,6 +16,11 @@ <dependencies> <dependency> <groupId>org.codehaus.sonar</groupId> + <artifactId>sonar-deprecated</artifactId> + </dependency> + + <dependency> + <groupId>org.codehaus.sonar</groupId> <artifactId>sonar-squid</artifactId> </dependency> <dependency> diff --git a/sonar-deprecated/pom.xml b/sonar-deprecated/pom.xml index 8737359a0ae..ccb684477ba 100644 --- a/sonar-deprecated/pom.xml +++ b/sonar-deprecated/pom.xml @@ -1,5 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.codehaus.sonar</groupId> @@ -18,7 +19,11 @@ <groupId>${project.groupId}</groupId> <artifactId>sonar-plugin-api</artifactId> </dependency> - + <dependency> + <groupId>xmlunit</groupId> + <artifactId>xmlunit</artifactId> + <scope>test</scope> + </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> @@ -39,5 +44,10 @@ <artifactId>dbunit</artifactId> <scope>test</scope> </dependency> + <dependency> + <groupId>ch.qos.logback</groupId> + <artifactId>logback-classic</artifactId> + <scope>test</scope> + </dependency> </dependencies> </project>
\ No newline at end of file diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/checkers/AnnotationCheckerFactory.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/AnnotationCheckerFactory.java index b12b8dcc34c..9f8574d9e83 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/checkers/AnnotationCheckerFactory.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/AnnotationCheckerFactory.java @@ -32,8 +32,11 @@ import java.util.IdentityHashMap; import java.util.Map; /** - * @since 2.1 + * @since 2.1 (experimental) + * @deprecated since 2.3 */ +@Deprecated + public class AnnotationCheckerFactory<CHECKER> extends CheckerFactory<CHECKER> { private CheckProfile profile; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/checkers/CheckerFactory.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/CheckerFactory.java index 62d46f67de3..de0a12a738c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/checkers/CheckerFactory.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/CheckerFactory.java @@ -24,8 +24,10 @@ import org.sonar.api.checks.profiles.Check; import java.util.Map; /** - * @since 2.1 + * @since 2.1 (experimental) + * @deprecated since 2.3 */ +@Deprecated public abstract class CheckerFactory<CHECKER> { public abstract Map<Check, CHECKER> create(); } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/checkers/MessageDispatcher.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/MessageDispatcher.java index 6321210f2a5..7f563920825 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/checkers/MessageDispatcher.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/MessageDispatcher.java @@ -33,6 +33,11 @@ import java.util.Collection; import java.util.Locale; import java.util.Map; +/** + * @since 2.1 (experimental) + * @deprecated since 2.3 + */ +@Deprecated public class MessageDispatcher { private Map<Check, Object> checkersByCheck; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/checkers/UnvalidCheckerException.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/UnvalidCheckerException.java index e732b77c645..0c98a1fece3 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/checkers/UnvalidCheckerException.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/checkers/UnvalidCheckerException.java @@ -19,6 +19,11 @@ */ package org.sonar.api.checks.checkers; +/** + * @since 2.1 (experimental) + * @deprecated since 2.3 + */ +@Deprecated public class UnvalidCheckerException extends RuntimeException { public UnvalidCheckerException() { } diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactory.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactory.java index 056461b3953..e5084965d42 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactory.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactory.java @@ -27,6 +27,11 @@ import java.util.Collection; import java.util.HashMap; import java.util.Map; +/** + * @since 2.1 (experimental) + * @deprecated since 2.3 + */ +@Deprecated public final class AnnotationCheckProfileFactory { private AnnotationCheckProfileFactory() { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/profiles/Check.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/Check.java index 617a084a695..b33c3a11ddc 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/profiles/Check.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/Check.java @@ -26,8 +26,10 @@ import java.util.HashMap; import java.util.Map; /** - * EXPERIMENTAL - will be used in version 2.2 + * @since 2.1 (experimental) + * @deprecated since 2.3 */ +@Deprecated public class Check { private String repositoryKey; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/profiles/CheckProfile.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfile.java index 7bb3c560af5..2a47f800bdc 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/profiles/CheckProfile.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfile.java @@ -26,6 +26,11 @@ import java.util.ArrayList; import java.util.Collection; import java.util.List; +/** + * @since 2.1 (experimental) + * @deprecated since 2.3 + */ +@Deprecated public class CheckProfile implements BatchExtension, ServerExtension { private String name; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/profiles/CheckProfileProvider.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfileProvider.java index 8eb21ef01da..0482cf447fd 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/profiles/CheckProfileProvider.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfileProvider.java @@ -24,8 +24,10 @@ import org.sonar.api.ServerExtension; import java.util.Collection; /** - * EXPERIMENTAL - will be used in version 2.2 + * @since 2.1 (experimental) + * @deprecated since 2.3 */ +@Deprecated public abstract class CheckProfileProvider implements ServerExtension { public abstract Collection<CheckProfile> provide(); diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshaller.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshaller.java index 3203b14e1e3..4e7d359643a 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshaller.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshaller.java @@ -36,8 +36,10 @@ import java.io.Writer; import java.util.Map; /** - * EXPERIMENTAL - will be used in version 2.3 + * @since 2.1 (experimental) + * @deprecated since 2.3 */ +@Deprecated public final class CheckProfileXmlMarshaller { public static void toXml(CheckProfile profile, Writer writer) { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactory.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactory.java index 7ea9638c8e7..08d21bb6fe3 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactory.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactory.java @@ -30,8 +30,10 @@ import java.util.Collection; import java.util.List; /** - * Load templates from class annotations (see the library sonar-check-api) + * @since 2.1 (experimental) + * @deprecated since 2.3 */ +@Deprecated public class AnnotationCheckTemplateFactory { private static final Logger LOG = LoggerFactory.getLogger(AnnotationCheckTemplateFactory.class); diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplate.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplate.java index c1b50cc1676..e54554b84cc 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplate.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplate.java @@ -27,10 +27,10 @@ import java.util.MissingResourceException; import java.util.ResourceBundle; /** - * Internationalized check template. Translations are loaded from resource bundles (properties files in the classpath) - * - * @since 2.1 + * @since 2.1 (experimental) + * @deprecated since 2.3 */ +@Deprecated public class BundleCheckTemplate extends CheckTemplate { private static final Logger LOG = LoggerFactory.getLogger(BundleCheckTemplate.class); diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplateProperty.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplateProperty.java index 10dd2cbfefc..ac1ebf6795a 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplateProperty.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/BundleCheckTemplateProperty.java @@ -21,6 +21,11 @@ package org.sonar.api.checks.templates; import java.util.Locale; +/** + * @since 2.1 (experimental) + * @deprecated since 2.3 + */ +@Deprecated public class BundleCheckTemplateProperty extends CheckTemplateProperty { private BundleCheckTemplate check; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/CheckTemplate.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplate.java index f2dc214ce56..a6df4a7e73f 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/CheckTemplate.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplate.java @@ -28,10 +28,10 @@ import java.util.List; import java.util.Locale; /** - * EXPERIMENTAL - will be used in version 2.2 - * - * @since 2.1 + * @since 2.1 (experimental) + * @deprecated since 2.3 */ +@Deprecated public abstract class CheckTemplate { protected String key; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/CheckTemplateFactory.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateFactory.java index c1e93e87337..d72dc1db31c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/CheckTemplateFactory.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateFactory.java @@ -22,9 +22,10 @@ package org.sonar.api.checks.templates; import java.util.Collection; /** - * EXPERIMENTAL - will be used in version 2.2 - * @since 2.1 + * @since 2.1 (experimental) + * @deprecated since 2.3 */ +@Deprecated public abstract class CheckTemplateFactory { public abstract Collection<CheckTemplate> create(); diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/CheckTemplateProperty.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateProperty.java index 91dc4428cde..34dce342635 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/CheckTemplateProperty.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateProperty.java @@ -22,10 +22,10 @@ package org.sonar.api.checks.templates; import java.util.Locale; /** - * EXPERIMENTAL - will be used in version 2.2 - * - * @since 2.1 + * @since 2.1 (experimental) + * @deprecated since 2.3 */ +@Deprecated public abstract class CheckTemplateProperty implements Comparable<CheckTemplateProperty> { protected String key; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepositories.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepositories.java index c5e6ea6395a..6a159a9bd27 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepositories.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepositories.java @@ -26,8 +26,10 @@ import java.util.HashMap; import java.util.Map; /** - * @since 2.1 + * @since 2.1 (experimental) + * @deprecated since 2.3 */ +@Deprecated public class CheckTemplateRepositories implements ServerExtension { private Map<String, CheckTemplateRepository> repositoriesByKey = new HashMap<String, CheckTemplateRepository>(); diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepository.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepository.java index 4b98660ae44..fa96311c8db 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepository.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/CheckTemplateRepository.java @@ -29,10 +29,10 @@ import java.io.InputStream; import java.util.*; /** - * EXPERIMENTAL - will be used in version 2.3 - * - * @since 2.1 + * @since 2.1 (experimental) + * @deprecated since 2.3 */ +@Deprecated public class CheckTemplateRepository implements RulesRepository { private String key; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplate.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplate.java index 76f6fb6ca4e..76f6fb6ca4e 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplate.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplate.java diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplateProperty.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplateProperty.java index 142942b8ced..142942b8ced 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplateProperty.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/DefaultCheckTemplateProperty.java diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/XmlCheckTemplateFactory.java b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/XmlCheckTemplateFactory.java index 0b51222c53d..0b51222c53d 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/templates/XmlCheckTemplateFactory.java +++ b/sonar-deprecated/src/main/java/org/sonar/api/checks/templates/XmlCheckTemplateFactory.java diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/checkers/AnnotationCheckerFactoryTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/AnnotationCheckerFactoryTest.java index ce18ab97951..8235725ac56 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/checkers/AnnotationCheckerFactoryTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/AnnotationCheckerFactoryTest.java @@ -1,22 +1,3 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * Sonar is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * Sonar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ package org.sonar.api.checks.checkers; import org.junit.Before; @@ -129,7 +110,7 @@ public class AnnotationCheckerFactoryTest { Map map = new HashMap(); map.put("max", "300"); when(check.getProperties()).thenReturn(map); - + factory.instantiate(check, CheckWithUnsupportedPropertyType.class); } @@ -156,59 +137,6 @@ public class AnnotationCheckerFactoryTest { } @Check(isoCategory = IsoCategory.Efficiency, priority = Priority.CRITICAL) -class CheckerWithoutProperties { - -} - -@Check(isoCategory = IsoCategory.Efficiency, priority = Priority.CRITICAL) -class CheckerWithStringProperty { - - @CheckProperty(key = "maiximum") - private String max; - - public String getMax() { - return max; - } -} - -@Check(isoCategory = IsoCategory.Efficiency, priority = Priority.CRITICAL) -class CheckerWithPrimitiveProperties { - - @CheckProperty(description = "Maximum threshold") - private int max = 50; - - @CheckProperty - private boolean active; - - public int getMax() { - return max; - } - - public boolean isActive() { - return active; - } -} - -@Check(isoCategory = IsoCategory.Efficiency, priority = Priority.CRITICAL) -class CheckerWithIntegerProperty { - - @CheckProperty - private Integer max; - - public Integer getMax() { - return max; - } -} - -@Check(isoCategory = IsoCategory.Efficiency, priority = Priority.CRITICAL) -class CheckWithUnsupportedPropertyType { - - @CheckProperty - private StringBuilder max = null; - -} - -@Check(isoCategory = IsoCategory.Efficiency, priority = Priority.CRITICAL) class CheckWithOverridenPropertyKey{ @CheckProperty(key = "maximum") diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckWithUnsupportedPropertyType.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckWithUnsupportedPropertyType.java new file mode 100644 index 00000000000..b5b9f1bacbb --- /dev/null +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckWithUnsupportedPropertyType.java @@ -0,0 +1,21 @@ +package org.sonar.api.checks.checkers; + +import org.sonar.check.Check; +import org.sonar.check.CheckProperty; +import org.sonar.check.IsoCategory; +import org.sonar.check.Priority; + +/** + * Created by IntelliJ IDEA. + * User: simonbrandhof + * Date: Sep 14, 2010 + * Time: 11:20:57 AM + * To change this template use File | Settings | File Templates. + */ +@Check(isoCategory = IsoCategory.Efficiency, priority = Priority.CRITICAL) +class CheckWithUnsupportedPropertyType { + + @CheckProperty + private StringBuilder max = null; + +} diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithIntegerProperty.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithIntegerProperty.java new file mode 100644 index 00000000000..4ae71746cf3 --- /dev/null +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithIntegerProperty.java @@ -0,0 +1,17 @@ +package org.sonar.api.checks.checkers; + +import org.sonar.check.Check; +import org.sonar.check.CheckProperty; +import org.sonar.check.IsoCategory; +import org.sonar.check.Priority; + +@Check(isoCategory = IsoCategory.Efficiency, priority = Priority.CRITICAL) +class CheckerWithIntegerProperty { + + @CheckProperty + private Integer max; + + public Integer getMax() { + return max; + } +} diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithPrimitiveProperties.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithPrimitiveProperties.java new file mode 100644 index 00000000000..15af2ade92f --- /dev/null +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithPrimitiveProperties.java @@ -0,0 +1,31 @@ +package org.sonar.api.checks.checkers; + +import org.sonar.check.Check; +import org.sonar.check.CheckProperty; +import org.sonar.check.IsoCategory; +import org.sonar.check.Priority; + +/** + * Created by IntelliJ IDEA. + * User: simonbrandhof + * Date: Sep 14, 2010 + * Time: 11:20:57 AM + * To change this template use File | Settings | File Templates. + */ +@Check(isoCategory = IsoCategory.Efficiency, priority = Priority.CRITICAL) +class CheckerWithPrimitiveProperties { + + @CheckProperty(description = "Maximum threshold") + private int max = 50; + + @CheckProperty + private boolean active; + + public int getMax() { + return max; + } + + public boolean isActive() { + return active; + } +} diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithStringProperty.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithStringProperty.java new file mode 100644 index 00000000000..a7f62a248e3 --- /dev/null +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithStringProperty.java @@ -0,0 +1,24 @@ +package org.sonar.api.checks.checkers; + +import org.sonar.check.Check; +import org.sonar.check.CheckProperty; +import org.sonar.check.IsoCategory; +import org.sonar.check.Priority; + +/** + * Created by IntelliJ IDEA. + * User: simonbrandhof + * Date: Sep 14, 2010 + * Time: 11:20:57 AM + * To change this template use File | Settings | File Templates. + */ +@Check(isoCategory = IsoCategory.Efficiency, priority = Priority.CRITICAL) +class CheckerWithStringProperty { + + @CheckProperty(key = "maiximum") + private String max; + + public String getMax() { + return max; + } +} diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithoutProperties.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithoutProperties.java new file mode 100644 index 00000000000..a3a72999cfd --- /dev/null +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/checkers/CheckerWithoutProperties.java @@ -0,0 +1,29 @@ +/* + * Sonar, open source software quality management tool. + * Copyright (C) 2009 SonarSource SA + * mailto:contact AT sonarsource DOT com + * + * Sonar is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Sonar is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.checks.checkers; + +import org.sonar.check.Check; +import org.sonar.check.IsoCategory; +import org.sonar.check.Priority; + +@Check(isoCategory = IsoCategory.Efficiency, priority = Priority.CRITICAL) +class CheckerWithoutProperties { + +} diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactoryTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactoryTest.java index cd752d669b4..48ead0f7d7f 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactoryTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/AnnotationCheckProfileFactoryTest.java @@ -1,30 +1,8 @@ -/* - * Sonar, open source software quality management tool. - * Copyright (C) 2009 SonarSource SA - * mailto:contact AT sonarsource DOT com - * - * Sonar is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * Sonar is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Sonar; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 - */ package org.sonar.api.checks.profiles; import org.hamcrest.BaseMatcher; import org.hamcrest.Description; import org.junit.Test; -import org.sonar.check.BelongsToProfile; -import org.sonar.check.BelongsToProfiles; -import org.sonar.check.IsoCategory; import org.sonar.check.Priority; import java.util.Arrays; @@ -35,6 +13,13 @@ import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; import static org.junit.internal.matchers.IsCollectionContaining.hasItem; +/** + * Created by IntelliJ IDEA. + * User: simonbrandhof + * Date: Sep 14, 2010 + * Time: 11:02:28 AM + * To change this template use File | Settings | File Templates. + */ public class AnnotationCheckProfileFactoryTest { @Test @@ -64,21 +49,6 @@ public class AnnotationCheckProfileFactoryTest { } } -@org.sonar.check.Check(priority = Priority.BLOCKER, isoCategory = IsoCategory.Maintainability) -@BelongsToProfile(title = "profile one", priority = Priority.MINOR) -class FakeCheckOne { - -} - -@org.sonar.check.Check(priority = Priority.BLOCKER, isoCategory = IsoCategory.Maintainability) -@BelongsToProfiles({ - @BelongsToProfile(title = "profile two", priority = Priority.INFO), - @BelongsToProfile(title = "profile one", priority = Priority.MINOR) -}) -class FakeCheckTwo { - -} - class CheckProfileMatcher extends BaseMatcher<CheckProfile> { private String name; private int numberOfChecks; diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/profiles/CheckProfileTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckProfileTest.java index 20d7ffc6910..20d7ffc6910 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/profiles/CheckProfileTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckProfileTest.java diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshallerTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshallerTest.java index bf6c488d237..bf6c488d237 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshallerTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckProfileXmlMarshallerTest.java diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/profiles/CheckTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckTest.java index 3d59ff3cb52..3d59ff3cb52 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/profiles/CheckTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/CheckTest.java diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/FakeCheckOne.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/FakeCheckOne.java new file mode 100644 index 00000000000..ec10e7d5f9f --- /dev/null +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/FakeCheckOne.java @@ -0,0 +1,18 @@ +package org.sonar.api.checks.profiles; + +import org.sonar.check.BelongsToProfile; +import org.sonar.check.IsoCategory; +import org.sonar.check.Priority; + +/** + * Created by IntelliJ IDEA. + * User: simonbrandhof + * Date: Sep 14, 2010 + * Time: 11:02:28 AM + * To change this template use File | Settings | File Templates. + */ +@org.sonar.check.Check(priority = Priority.BLOCKER, isoCategory = IsoCategory.Maintainability) +@BelongsToProfile(title = "profile one", priority = Priority.MINOR) +class FakeCheckOne { + +} diff --git a/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/FakeCheckTwo.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/FakeCheckTwo.java new file mode 100644 index 00000000000..1e65c3e1f5b --- /dev/null +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/profiles/FakeCheckTwo.java @@ -0,0 +1,22 @@ +package org.sonar.api.checks.profiles; + +import org.sonar.check.BelongsToProfile; +import org.sonar.check.BelongsToProfiles; +import org.sonar.check.IsoCategory; +import org.sonar.check.Priority; + +/** + * Created by IntelliJ IDEA. + * User: simonbrandhof + * Date: Sep 14, 2010 + * Time: 11:02:28 AM + * To change this template use File | Settings | File Templates. + */ +@org.sonar.check.Check(priority = Priority.BLOCKER, isoCategory = IsoCategory.Maintainability) +@BelongsToProfiles({ + @BelongsToProfile(title = "profile two", priority = Priority.INFO), + @BelongsToProfile(title = "profile one", priority = Priority.MINOR) +}) +class FakeCheckTwo { + +} diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/samples/AnnotatedCheckWithBundles.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/AnnotatedCheckWithBundles.java index 5618932fda5..5618932fda5 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/samples/AnnotatedCheckWithBundles.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/AnnotatedCheckWithBundles.java diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/samples/DetailedAnnotatedCheck.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/DetailedAnnotatedCheck.java index 7e461ea1248..7e461ea1248 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/samples/DetailedAnnotatedCheck.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/DetailedAnnotatedCheck.java diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/samples/I18nCheckWithAlternativeBundle.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/I18nCheckWithAlternativeBundle.java index 50dc9a78df2..50dc9a78df2 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/samples/I18nCheckWithAlternativeBundle.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/I18nCheckWithAlternativeBundle.java diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/samples/I18nCheckWithoutDefaultLocale.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/I18nCheckWithoutDefaultLocale.java index 7828d928cb1..7828d928cb1 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/samples/I18nCheckWithoutDefaultLocale.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/I18nCheckWithoutDefaultLocale.java diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/samples/SimpleAnnotatedCheck.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/SimpleAnnotatedCheck.java index 67e99868bbb..67e99868bbb 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/samples/SimpleAnnotatedCheck.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/samples/SimpleAnnotatedCheck.java diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactoryTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactoryTest.java index 5f8f5de48d6..5f8f5de48d6 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactoryTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/AnnotationCheckTemplateFactoryTest.java diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/templates/BundleCheckTemplateTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/BundleCheckTemplateTest.java index 905ba0399b8..905ba0399b8 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/templates/BundleCheckTemplateTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/BundleCheckTemplateTest.java diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/templates/CheckTemplateRepositoriesTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/CheckTemplateRepositoriesTest.java index 691a2084eaf..691a2084eaf 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/templates/CheckTemplateRepositoriesTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/CheckTemplateRepositoriesTest.java diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/checks/templates/DefaultCheckTemplateTest.java b/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/DefaultCheckTemplateTest.java index e83896a6197..e83896a6197 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/checks/templates/DefaultCheckTemplateTest.java +++ b/sonar-deprecated/src/test/java/org/sonar/api/checks/templates/DefaultCheckTemplateTest.java diff --git a/sonar-plugin-api/src/test/resources/org/sonar/api/checks/profiles/CheckProfileXmlMarshallerTest/profile.xml b/sonar-deprecated/src/test/resources/org/sonar/api/checks/profiles/CheckProfileXmlMarshallerTest/profile.xml index bcbba0f82ba..bcbba0f82ba 100644 --- a/sonar-plugin-api/src/test/resources/org/sonar/api/checks/profiles/CheckProfileXmlMarshallerTest/profile.xml +++ b/sonar-deprecated/src/test/resources/org/sonar/api/checks/profiles/CheckProfileXmlMarshallerTest/profile.xml diff --git a/sonar-plugin-api/src/test/resources/org/sonar/api/checks/samples/AnnotatedCheckWithBundles.properties b/sonar-deprecated/src/test/resources/org/sonar/api/checks/samples/AnnotatedCheckWithBundles.properties index e1d764b21b4..e1d764b21b4 100644 --- a/sonar-plugin-api/src/test/resources/org/sonar/api/checks/samples/AnnotatedCheckWithBundles.properties +++ b/sonar-deprecated/src/test/resources/org/sonar/api/checks/samples/AnnotatedCheckWithBundles.properties diff --git a/sonar-plugin-api/src/test/resources/org/sonar/api/checks/samples/AnnotatedCheckWithBundles_fr.properties b/sonar-deprecated/src/test/resources/org/sonar/api/checks/samples/AnnotatedCheckWithBundles_fr.properties index 14e2f2dbbcf..14e2f2dbbcf 100644 --- a/sonar-plugin-api/src/test/resources/org/sonar/api/checks/samples/AnnotatedCheckWithBundles_fr.properties +++ b/sonar-deprecated/src/test/resources/org/sonar/api/checks/samples/AnnotatedCheckWithBundles_fr.properties diff --git a/sonar-plugin-api/src/test/resources/org/sonar/api/checks/samples/I18nCheckWithoutDefaultLocale_fr.properties b/sonar-deprecated/src/test/resources/org/sonar/api/checks/samples/I18nCheckWithoutDefaultLocale_fr.properties index d020f8d393b..d020f8d393b 100644 --- a/sonar-plugin-api/src/test/resources/org/sonar/api/checks/samples/I18nCheckWithoutDefaultLocale_fr.properties +++ b/sonar-deprecated/src/test/resources/org/sonar/api/checks/samples/I18nCheckWithoutDefaultLocale_fr.properties diff --git a/sonar-plugin-api/src/test/resources/org/sonar/api/checks/samples/alternative/path/AlternativeBundle.properties b/sonar-deprecated/src/test/resources/org/sonar/api/checks/samples/alternative/path/AlternativeBundle.properties index ceae9d0375d..ceae9d0375d 100644 --- a/sonar-plugin-api/src/test/resources/org/sonar/api/checks/samples/alternative/path/AlternativeBundle.properties +++ b/sonar-deprecated/src/test/resources/org/sonar/api/checks/samples/alternative/path/AlternativeBundle.properties diff --git a/sonar-server/src/main/java/org/sonar/server/rules/ProfilesConsole.java b/sonar-server/src/main/java/org/sonar/server/rules/ProfilesConsole.java index 934575f3f47..e538f7c80cf 100644 --- a/sonar-server/src/main/java/org/sonar/server/rules/ProfilesConsole.java +++ b/sonar-server/src/main/java/org/sonar/server/rules/ProfilesConsole.java @@ -129,6 +129,8 @@ public final class ProfilesConsole implements ServerComponent { ProfileImporter importer = getProfileImporter(importerKey); RulesProfile profile = importer.importProfile(new StringReader(profileDefinition), messages); if (!messages.hasErrors()) { + profile.setName(profileName); + profile.setLanguage(language); DatabaseSession session = sessionFactory.getSession(); session.saveWithoutFlush(profile); session.commit(); |