Skip to content
Snippets Groups Projects
Commit 6827e171 authored by Hallvard Trætteberg's avatar Hallvard Trætteberg
Browse files

Handle intentional (spot) bug

parent e0b12ba2
No related branches found
No related tags found
No related merge requests found
package fxutil;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/**
* Annontation to suppress spotbugs warnings.
* Must have this specific name to be considered by spotbugs.
*/
@Retention(RetentionPolicy.CLASS)
public @interface SuppressFBWarnings {
/**
* The set of FindBugs warnings that are to be suppressed in
* annotated element. The value can be a bug category, kind or pattern.
*/
String[] value() default {};
/**
* Optional documentation of the reason why the warning is suppressed.
*/
String justification() default "";
}
package fxutil.doc;
import fxutil.SuppressFBWarnings;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
......@@ -35,6 +36,9 @@ public class FileMenuController {
*
* @param documentStorage the document storage
*/
@SuppressFBWarnings(
value = "EI_EXPOSE_REP2",
justification = "We intentioanlly don't deep copy documentStorage")
public void setDocumentStorage(final DocumentStorage<File> documentStorage) {
this.documentStorage = documentStorage;
if (importMenu != null) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment