diff --git a/buildSrc/src/main/kotlin/pg-index-health-test-starter.java-conventions.gradle.kts b/buildSrc/src/main/kotlin/pg-index-health-test-starter.java-conventions.gradle.kts index b64c035..349b0ff 100644 --- a/buildSrc/src/main/kotlin/pg-index-health-test-starter.java-conventions.gradle.kts +++ b/buildSrc/src/main/kotlin/pg-index-health-test-starter.java-conventions.gradle.kts @@ -23,6 +23,8 @@ dependencies { errorprone("jp.skypencil.errorprone.slf4j:errorprone-slf4j:0.1.20") spotbugsPlugins("jp.skypencil.findbugs.slf4j:bug-pattern:1.5.0") + spotbugsPlugins("com.h3xstream.findsecbugs:findsecbugs-plugin:1.12.0") + spotbugsPlugins("com.mebigfatguy.sb-contrib:sb-contrib:7.6.3") } java { diff --git a/config/spotbugs/exclude.xml b/config/spotbugs/exclude.xml index 1883057..5dba991 100644 --- a/config/spotbugs/exclude.xml +++ b/config/spotbugs/exclude.xml @@ -15,4 +15,12 @@ + + + + + + + + diff --git a/pg-index-health-test-starter/src/main/java/io/github/mfvanek/pg/spring/DatabaseStructureHealthProperties.java b/pg-index-health-test-starter/src/main/java/io/github/mfvanek/pg/spring/DatabaseStructureHealthProperties.java index 88bd17b..b5d7370 100644 --- a/pg-index-health-test-starter/src/main/java/io/github/mfvanek/pg/spring/DatabaseStructureHealthProperties.java +++ b/pg-index-health-test-starter/src/main/java/io/github/mfvanek/pg/spring/DatabaseStructureHealthProperties.java @@ -35,4 +35,11 @@ public DatabaseStructureHealthProperties(@DefaultValue("true") final boolean ena public boolean isEnabled() { return enabled; } + + @Override + public String toString() { + return DatabaseStructureHealthProperties.class.getSimpleName() + '{' + + "enabled=" + enabled + + '}'; + } } diff --git a/pg-index-health-test-starter/src/test/java/io/github/mfvanek/pg/spring/DatabaseStructureHealthPropertiesTest.java b/pg-index-health-test-starter/src/test/java/io/github/mfvanek/pg/spring/DatabaseStructureHealthPropertiesTest.java index 04d50d0..84a7d8e 100644 --- a/pg-index-health-test-starter/src/test/java/io/github/mfvanek/pg/spring/DatabaseStructureHealthPropertiesTest.java +++ b/pg-index-health-test-starter/src/test/java/io/github/mfvanek/pg/spring/DatabaseStructureHealthPropertiesTest.java @@ -20,9 +20,13 @@ void getterShouldWork() { final DatabaseStructureHealthProperties propertiesEnabled = new DatabaseStructureHealthProperties(true); assertThat(propertiesEnabled.isEnabled()) .isTrue(); + assertThat(propertiesEnabled) + .hasToString("DatabaseStructureHealthProperties{enabled=true}"); final DatabaseStructureHealthProperties propertiesDisabled = new DatabaseStructureHealthProperties(false); assertThat(propertiesDisabled.isEnabled()) .isFalse(); + assertThat(propertiesDisabled) + .hasToString("DatabaseStructureHealthProperties{enabled=false}"); } }