Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
todo-list-example
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ole Hermann Bakka
todo-list-example
Commits
6827e171
Commit
6827e171
authored
3 years ago
by
Hallvard Trætteberg
Browse files
Options
Downloads
Patches
Plain Diff
Handle intentional (spot) bug
parent
e0b12ba2
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
todolist/fxutil/src/main/java/fxutil/SuppressFBWarnings.java
+22
-0
22 additions, 0 deletions
todolist/fxutil/src/main/java/fxutil/SuppressFBWarnings.java
todolist/fxutil/src/main/java/fxutil/doc/FileMenuController.java
+5
-1
5 additions, 1 deletion
...t/fxutil/src/main/java/fxutil/doc/FileMenuController.java
with
27 additions
and
1 deletion
todolist/fxutil/src/main/java/fxutil/SuppressFBWarnings.java
0 → 100644
+
22
−
0
View file @
6827e171
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
""
;
}
This diff is collapsed.
Click to expand it.
todolist/fxutil/src/main/java/fxutil/doc/FileMenuController.java
+
5
−
1
View file @
6827e171
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
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment