Consider adding a doc comment for User
38 public User() {
39 }
40
41 public User(String username, String password) {42 this.username = username;43 this.password = password;44 }45
46 @Override
47 public boolean isAccountNonExpired() {
Consider adding a doc comment for User
35 private String fullName;
36 private Set<Role> authorities = new HashSet<>();
37
38 public User() {39 }40
41 public User(String username, String password) {
42 this.username = username;
Consider adding a doc comment for NotFoundException
8 super(message);
9 }
10
11 public NotFoundException(Class<?> clazz, long id) {12 super(String.format("Entity %s with id %d not found", clazz.getSimpleName(), id));13 }14
15 public NotFoundException(Class<?> clazz, String id) {
16 super(String.format("Entity %s with id %s not found", clazz.getSimpleName(), id));
Consider adding a doc comment for NotFoundException
16 super(String.format("Entity %s with id %s not found", clazz.getSimpleName(), id));
17 }
18
19 public NotFoundException(Class<?> clazz, ObjectId id) {20 super(String.format("Entity %s with id %s not found", clazz.getSimpleName(), id.toString()));21 }22
23}
Consider adding a doc comment for NotFoundException
12 super(String.format("Entity %s with id %d not found", clazz.getSimpleName(), id));
13 }
14
15 public NotFoundException(Class<?> clazz, String id) {16 super(String.format("Entity %s with id %s not found", clazz.getSimpleName(), id));17 }18
19 public NotFoundException(Class<?> clazz, ObjectId id) {
20 super(String.format("Entity %s with id %s not found", clazz.getSimpleName(), id.toString()));
Consider adding a doc comment for NotFoundException
4
5public class NotFoundException extends RuntimeException {
6
7 public NotFoundException(String message) { 8 super(message); 9 }10
11 public NotFoundException(Class<?> clazz, long id) {
12 super(String.format("Entity %s with id %d not found", clazz.getSimpleName(), id));
Consider adding a doc comment for InternalServerError
9 super(message);
10 }
11
12 public InternalServerError(String message, Throwable cause) {13 super(message, cause);14 }15
16 public InternalServerError(Throwable cause) {
17 super(cause);
Consider adding a doc comment for InternalServerError
2
3public class InternalServerError extends RuntimeException {
4
5 public InternalServerError() { 6 } 7
8 public InternalServerError(String message) {
9 super(message);
Consider adding a doc comment for InternalServerError
5 public InternalServerError() {
6 }
7
8 public InternalServerError(String message) { 9 super(message);10 }11
12 public InternalServerError(String message, Throwable cause) {
13 super(message, cause);
Consider adding a doc comment for InternalServerError
13 super(message, cause);
14 }
15
16 public InternalServerError(Throwable cause) {17 super(cause);18 }19
20}
Consider adding a doc comment for DatabaseInitializer
20
21 private final UserService userService;
22
23 public DatabaseInitializer(UserService userService) {24 this.userService = userService;25 }26
27 @Override
28 public void onApplicationEvent(ApplicationReadyEvent applicationReadyEvent) {
Description
This constructor does not have any documentation.
Consider adding a documentation comment to explain its use.
While it may seem like the usage of a constructor is perfectly obvious, any consumers of your API may not be able to pick up on certain details.
Bad Practice
In the example below, it is difficult to understand what the arguments of this constructor for DataForwarder
signify.
class DataForwarder {
public DataForwarder(int nTypes, String... values) {
// ...
}
}
Recommended
Document the constructor and provide useful information about it or its parameters as required.
/**
* Initializes a DataForwarder with a set of types to filter by, along with their names.
*
* @param nTypes - The number of types to filter by.
* @param values - The input type names to filter by.
*/
public DataForwarder(int nTypes, String... values) {
// ...
}
Exceptions
If you feel this constructor does not require documentation, you can add a skipcq comment to this constructor.