Apply suggestions from code review
Co-authored-by: CyB3RC0nN0R <CyB3RC0nN0R@users.noreply.github.com>
This commit is contained in:
parent
1026ca4f8d
commit
439e274c37
@ -41,5 +41,6 @@ public class GroupMessageStatusChangeEvent extends MessageStatusChangeEvent {
|
||||
public long getMemberID() { return memberID; }
|
||||
|
||||
@Override
|
||||
public String toString() { return String.format("GroupMessageStatusChangeEvent[meta=%s, memberID=%d]", super.toString(), memberID); }
|
||||
public String toString() { return String.format("GroupMessageStatusChangeEvent[meta=%s,memberID=%d]", super.toString(), memberID); }
|
||||
|
||||
}
|
||||
|
@ -37,10 +37,10 @@ public class GroupResizeEvent extends Event<User> {
|
||||
public GroupResizeEvent(User user, Group group, ElementOperation operation) {
|
||||
super(user);
|
||||
if (group.getContacts().contains(user)) {
|
||||
if (operation.equals(ElementOperation.ADD)) throw new IllegalStateException(
|
||||
if (operation.equals(ElementOperation.ADD)) throw new IllegalArgumentException(
|
||||
"Cannot add " + user + " to group " + group.getID() + " because he is already a member of this group");
|
||||
} else if (operation.equals(ElementOperation.REMOVE))
|
||||
throw new IllegalStateException("Cannot remove " + user + " from group " + group.getID() + " because he is no part of this group");
|
||||
throw new IllegalArgumentException("Cannot remove " + user + " from group " + group.getID() + " because he is no part of this group");
|
||||
groupID = group.getID();
|
||||
this.operation = operation;
|
||||
}
|
||||
|
@ -16,12 +16,12 @@ public class HandshakeRejectionEvent extends Event<String> {
|
||||
/**
|
||||
* Select this value if a given password hash or user was incorrect.
|
||||
*/
|
||||
public static final String WRONG_PASSWORD_OR_USER = "password or user were entered incorrectly";
|
||||
public static final String WRONG_PASSWORD_OR_USER = "Incorrect user name or password.";
|
||||
|
||||
/**
|
||||
* Select this value if the handshake could not be completed for some reason.
|
||||
*/
|
||||
public static final String INTERNAL_ERROR = "the process could not be finished as an internal error occurred";
|
||||
public static final String INTERNAL_ERROR = "An internal error occured.";
|
||||
|
||||
private static final long serialVersionUID = 0L;
|
||||
|
||||
|
@ -62,9 +62,6 @@ public class EnvoyLog {
|
||||
}
|
||||
consoleHandler = new StreamHandler(System.out, formatter) {
|
||||
|
||||
/**
|
||||
* {@inheritDoc}
|
||||
*/
|
||||
@Override
|
||||
public synchronized void publish(LogRecord record) {
|
||||
super.publish(record);
|
||||
|
Reference in New Issue
Block a user