Skip to content

Commit

Permalink
Address several Checkstyle warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
NicMcPhee committed Aug 31, 2024
1 parent b11fcb2 commit 7a1dc7c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 12 additions & 1 deletion server/src/main/java/umm3601/todo/Todo.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
package umm3601.todo;

// Normally you'd want all fields to be private, but
// we need the fields in this class to be public since
// they will be written to by the Jackson library. We
// need to suppress the Visibility Modifier
// (https://checkstyle.sourceforge.io/config_design.html#VisibilityModifier)
// check in CheckStyle so that we don't get a failed
// build when Gradle runs CheckStyle.
@SuppressWarnings({"VisibilityModifier"})
public class Todo {
public String _id;
// By default Java field names shouldn't start with underscores.
// Here, though, we *have* to use the name `_id` to match the
// name of the field in the database.
@SuppressWarnings({"MemberName"}) public String _id;
public String owner;
public boolean status;
public String body;
Expand Down
2 changes: 0 additions & 2 deletions server/src/test/java/umm3601/todo/TodoControllerSpec.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@

import io.javalin.http.Context;
import umm3601.Main;
import umm3601.user.UserController;
import umm3601.user.UserDatabase;

public class TodoControllerSpec {
private static TodoDatabase db;
Expand Down

0 comments on commit 7a1dc7c

Please sign in to comment.