Shahar Havivi has uploaded a new change for review. Change subject: findbugs: ignore: added ignore missing break in switch-case ......................................................................
findbugs: ignore: added ignore missing break in switch-case findbugs reason: SF: Switch statement found where one case falls through to the next case (SF_SWITCH_FALLTHROUGH) Change-Id: I33b157dee88622359643991d360cb3d3356736c8 Signed-off-by: Shahar Havivi <shav...@redhat.com> --- M backend/manager/modules/bll/exclude-filters.xml A backend/manager/modules/compat/exclude-filters.xml M backend/manager/modules/compat/pom.xml A backend/manager/modules/restapi/jaxrs/exclude-filters.xml M backend/manager/modules/restapi/jaxrs/pom.xml 5 files changed, 85 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/65/14865/1 diff --git a/backend/manager/modules/bll/exclude-filters.xml b/backend/manager/modules/bll/exclude-filters.xml index 3ce0438..df64431 100644 --- a/backend/manager/modules/bll/exclude-filters.xml +++ b/backend/manager/modules/bll/exclude-filters.xml @@ -42,4 +42,18 @@ <Method name="getInstance"/> <Bug code="DC"/> </Match> + + <Match> + <!-- + findbugs complain that there is no break in switch statement, + In this case we do not need break because in both cases (preview and stateless) we need + to call restoreConfiguration() + + findbugs reason: + SF: Switch statement found where one case falls through to the next case (SF_SWITCH_FALLTHROUGH) + --> + <Class name="org.ovirt.engine.core.bll.RestoreAllSnapshotsCommand" /> + <Method name="restoreSnapshotAndRemoveObsoleteSnapshots"/> + <Bug code="SF"/> + </Match> </FindBugsFilter> diff --git a/backend/manager/modules/compat/exclude-filters.xml b/backend/manager/modules/compat/exclude-filters.xml new file mode 100644 index 0000000..fe4155b --- /dev/null +++ b/backend/manager/modules/compat/exclude-filters.xml @@ -0,0 +1,29 @@ +<FindBugsFilter> + <!-- + findbugs complains that we don't use break in toString(), + In this case we do want to "fall" to the next case since we want to handle + all the minor/major cases + + findbugs reason: + SF: Switch statement found where one case falls through to the next case (SF_SWITCH_FALLTHROUGH) + --> + <Match> + <Class name="org.ovirt.engine.core.compat.Version" /> + <Method name="toString"/> + <Bug code="SF"/> + </Match> + + <!-- + findbugs complains that we don't use break in setValue(), + In this case we do want to "fall" to the next case since we want to handle + all the minor/major cases + + findbugs reason: + SF: Switch statement found where one case falls through to the next case (SF_SWITCH_FALLTHROUGH) + --> + <Match> + <Class name="org.ovirt.engine.core.compat.Version" /> + <Method name="setValue"/> + <Bug code="SF"/> + </Match> +</FindBugsFilter> diff --git a/backend/manager/modules/compat/pom.xml b/backend/manager/modules/compat/pom.xml index 860c5ba..3429584 100644 --- a/backend/manager/modules/compat/pom.xml +++ b/backend/manager/modules/compat/pom.xml @@ -38,6 +38,17 @@ <groupId>org.ovirt.engine</groupId> <artifactId>jboss-modules-maven-plugin</artifactId> </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>findbugs-maven-plugin</artifactId> + <version>${findbugs.version}</version> + <configuration> + <xmlOutput>true</xmlOutput> + <!-- Optional directory to put findbugs xdoc xml report --> + <excludeFilterFile>exclude-filters.xml</excludeFilterFile> + <xmlOutputDirectory>target/site</xmlOutputDirectory> + </configuration> + </plugin> </plugins> </build> diff --git a/backend/manager/modules/restapi/jaxrs/exclude-filters.xml b/backend/manager/modules/restapi/jaxrs/exclude-filters.xml new file mode 100644 index 0000000..51d453f --- /dev/null +++ b/backend/manager/modules/restapi/jaxrs/exclude-filters.xml @@ -0,0 +1,15 @@ +<FindBugsFilter> + <!-- + findbugs complains that we don't use break in parseVersion, + In this case we do want to "fall" to the next case since we want to handle + all the minor/major cases + + findbugs reason: + SF: Switch statement found where one case falls through to the next case (SF_SWITCH_FALLTHROUGH) + --> + <Match> + <Class name="org.ovirt.engine.api.restapi.util.VersionHelper" /> + <Method name="parseVersion"/> + <Bug code="SF"/> + </Match> +</FindBugsFilter> diff --git a/backend/manager/modules/restapi/jaxrs/pom.xml b/backend/manager/modules/restapi/jaxrs/pom.xml index 6bb8d73..8a95904 100644 --- a/backend/manager/modules/restapi/jaxrs/pom.xml +++ b/backend/manager/modules/restapi/jaxrs/pom.xml @@ -96,4 +96,20 @@ </dependencies> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>findbugs-maven-plugin</artifactId> + <version>${findbugs.version}</version> + <configuration> + <xmlOutput>true</xmlOutput> + <!-- Optional directory to put findbugs xdoc xml report --> + <excludeFilterFile>exclude-filters.xml</excludeFilterFile> + <xmlOutputDirectory>target/site</xmlOutputDirectory> + </configuration> + </plugin> + </plugins> + </build> + </project> -- To view, visit http://gerrit.ovirt.org/14865 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I33b157dee88622359643991d360cb3d3356736c8 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Shahar Havivi <shav...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches