Add missing @Override annotations

This commit also adds MissingOverrideCheck module to Checkstyle configuration.
This commit is contained in:
Johnny Lim
2017-11-01 22:28:29 +09:00
committed by Rob Winch
parent be0c6cde3d
commit 99df632f24
44 changed files with 184 additions and 4 deletions

View File

@@ -84,6 +84,7 @@ public class Contact implements Serializable {
this.name = name;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(super.toString() + ": ");

View File

@@ -31,6 +31,7 @@ public class Directory extends AbstractElement {
super(name, parent);
}
@Override
public String toString() {
return "Directory[fullName='" + getFullName() + "'; name='" + getName()
+ "'; id='" + getId() + "'; parent='" + getParent() + "']";

View File

@@ -39,6 +39,7 @@ public class File extends AbstractElement {
this.content = content;
}
@Override
public String toString() {
return "File[fullName='" + getFullName() + "'; name='" + getName() + "'; id='"
+ getId() + "'; content=" + getContent() + "'; parent='" + getParent()

View File

@@ -44,14 +44,17 @@ public class UsernameEqualsPasswordLoginModule implements LoginModule {
// ~ Methods
// ========================================================================================================
@Override
public boolean abort() throws LoginException {
return true;
}
@Override
public boolean commit() throws LoginException {
return true;
}
@Override
public void initialize(Subject subject, CallbackHandler callbackHandler,
Map<String, ?> sharedState, Map<String, ?> options) {
this.subject = subject;
@@ -70,6 +73,7 @@ public class UsernameEqualsPasswordLoginModule implements LoginModule {
}
}
@Override
public boolean login() throws LoginException {
if (username == null || !username.equals(password)) {
throw new LoginException("username is not equal to password");
@@ -82,6 +86,7 @@ public class UsernameEqualsPasswordLoginModule implements LoginModule {
return true;
}
@Override
public boolean logout() throws LoginException {
return true;
}
@@ -93,10 +98,12 @@ public class UsernameEqualsPasswordLoginModule implements LoginModule {
this.username = username;
}
@Override
public String getName() {
return username;
}
@Override
public String toString() {
return "Principal [name=" + getName() + "]";
}

View File

@@ -65,6 +65,7 @@ public class Account {
this.overdraft = overdraft;
}
@Override
public String toString() {
return "Account[id=" + id + ",balance=" + balance + ",holder=" + holder
+ ", overdraft=" + overdraft + "]";