diff options
author | simonbrandhof <simon.brandhof@gmail.com> | 2012-01-24 14:40:27 +0100 |
---|---|---|
committer | simonbrandhof <simon.brandhof@gmail.com> | 2012-01-24 14:41:22 +0100 |
commit | 4eab0b33d1e3df3669b8ee55cebe43e3244aa2d1 (patch) | |
tree | c33bebdba41dc74ec4ba6f9d5f0499d4852ca2b9 /sonar-plugin-api | |
parent | 2480541720256002f5402ebb004c85034fb9f2de (diff) | |
download | sonarqube-4eab0b33d1e3df3669b8ee55cebe43e3244aa2d1.tar.gz sonarqube-4eab0b33d1e3df3669b8ee55cebe43e3244aa2d1.zip |
Move some purge tasks to MyBatis
SONAR-2754 add the parameter sonar.dbcleaner.cleanDirectoryHistory
SONAR-2757 remove fullscan requests on the table SNAPSHOTS
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/checks/AnnotationCheckFactory.java | 4 | ||||
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/utils/FieldUtils2.java (renamed from sonar-plugin-api/src/main/java/org/sonar/api/utils/FieldUtils.java) | 6 | ||||
-rw-r--r-- | sonar-plugin-api/src/test/java/org/sonar/api/utils/FieldUtils2Test.java (renamed from sonar-plugin-api/src/test/java/org/sonar/api/utils/FieldUtilsTest.java) | 13 |
3 files changed, 11 insertions, 12 deletions
diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/checks/AnnotationCheckFactory.java b/sonar-plugin-api/src/main/java/org/sonar/api/checks/AnnotationCheckFactory.java index 9088e89454c..a6e9147d22c 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/checks/AnnotationCheckFactory.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/checks/AnnotationCheckFactory.java @@ -24,7 +24,7 @@ import org.apache.commons.lang.StringUtils; import org.sonar.api.profiles.RulesProfile; import org.sonar.api.rules.ActiveRule; import org.sonar.api.rules.ActiveRuleParam; -import org.sonar.api.utils.FieldUtils; +import org.sonar.api.utils.FieldUtils2; import org.sonar.api.utils.SonarException; import org.sonar.check.Check; import org.sonar.check.CheckProperty; @@ -144,7 +144,7 @@ public final class AnnotationCheckFactory extends CheckFactory { } private Field getField(Object check, String key) { - List<Field> fields = FieldUtils.getFields(check.getClass(), true); + List<Field> fields = FieldUtils2.getFields(check.getClass(), true); for (Field field : fields) { RuleProperty propertyAnnotation = field.getAnnotation(RuleProperty.class); if (propertyAnnotation != null) { diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/utils/FieldUtils.java b/sonar-plugin-api/src/main/java/org/sonar/api/utils/FieldUtils2.java index de459c25af1..cc922397148 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/utils/FieldUtils.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/utils/FieldUtils2.java @@ -27,12 +27,12 @@ import java.lang.reflect.Modifier; import java.util.List; /** - * Add features missing in org.apache.commons.lang3.reflect.FieldUtils + * Add features missing in org.apache.commons.lang.reflect.FieldUtils * * @since 2.14 */ -public final class FieldUtils { - private FieldUtils() { +public final class FieldUtils2 { + private FieldUtils2() { } /** diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/utils/FieldUtilsTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/utils/FieldUtils2Test.java index 4694c498e8c..f9615c2d394 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/utils/FieldUtilsTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/utils/FieldUtils2Test.java @@ -26,15 +26,14 @@ import org.junit.Test; import java.lang.reflect.Field; import java.util.List; -import static org.hamcrest.core.Is.is; import static org.junit.Assert.assertThat; import static org.junit.matchers.JUnitMatchers.hasItem; -public class FieldUtilsTest { +public class FieldUtils2Test { @Test public void shouldGetFieldsOfSingleClass() { - List<Field> fields = FieldUtils.getFields(FieldsWithDifferentModifiers.class, true); + List<Field> fields = FieldUtils2.getFields(FieldsWithDifferentModifiers.class, true); assertThat(fields, hasItem(new FieldMatcher("publicField"))); assertThat(fields, hasItem(new FieldMatcher("protectedField"))); assertThat(fields, hasItem(new FieldMatcher("packageField"))); @@ -47,7 +46,7 @@ public class FieldUtilsTest { @Test public void shouldGetFieldsOfClassHierarchy() { - List<Field> fields = FieldUtils.getFields(Child.class, true); + List<Field> fields = FieldUtils2.getFields(Child.class, true); assertThat(fields, hasItem(new FieldMatcher("publicField"))); assertThat(fields, hasItem(new FieldMatcher("protectedField"))); assertThat(fields, hasItem(new FieldMatcher("packageField"))); @@ -61,7 +60,7 @@ public class FieldUtilsTest { @Test public void shouldGetOnlyAccessibleFields() { - List<Field> fields = FieldUtils.getFields(Child.class, false); + List<Field> fields = FieldUtils2.getFields(Child.class, false); assertThat(fields, hasItem(new FieldMatcher("publicField"))); assertThat(fields, hasItem(new FieldMatcher("publicStaticField"))); @@ -69,14 +68,14 @@ public class FieldUtilsTest { @Test public void shouldGetFieldsOfInterface() { - List<Field> fields = FieldUtils.getFields(InterfaceWithFields.class, true); + List<Field> fields = FieldUtils2.getFields(InterfaceWithFields.class, true); assertThat(fields, hasItem(new FieldMatcher("INTERFACE_FIELD"))); } @Test public void shouldGetFieldsOfInterfaceImplementation() { - List<Field> fields = FieldUtils.getFields(InterfaceImplementation.class, true); + List<Field> fields = FieldUtils2.getFields(InterfaceImplementation.class, true); assertThat(fields, hasItem(new FieldMatcher("INTERFACE_FIELD"))); } |