Skip to content

Commit

Permalink
Decrease toString duplication in auth
Browse files Browse the repository at this point in the history
  • Loading branch information
mbax committed Aug 23, 2015
1 parent 4b5133a commit 92fa36a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import org.kitteh.irc.client.library.auth.protocol.element.Password;
import org.kitteh.irc.client.library.auth.protocol.element.Username;
import org.kitteh.irc.client.library.util.Sanity;
import org.kitteh.irc.client.library.util.ToStringer;

import javax.annotation.Nonnull;

Expand Down Expand Up @@ -96,4 +97,10 @@ public final void startAuthentication() {
*/
@Nonnull
protected abstract String getAuthentication();

@Nonnull
@Override
public String toString() {
return new ToStringer(this).add("user", this.getUsername()).add("pass", this.getPassword()).toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,4 @@ protected String getAuthentication() {
public Object getEventListener() {
return this.listener;
}

@Nonnull
@Override
public String toString() {
return new ToStringer(this).add("user", this.getUsername()).add("pass", this.getPassword()).toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,4 @@ protected String getAuthentication() {
public Object getEventListener() {
return this.listener;
}

@Nonnull
@Override
public String toString() {
return new ToStringer(this).add("user", this.getUsername()).add("pass", this.getPassword()).toString();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,4 @@ protected String getAuthentication() {
public Object getEventListener() {
return this.listener;
}

@Nonnull
@Override
public String toString() {
return new ToStringer(this).add("user", this.getUsername()).add("pass", this.getPassword()).toString();
}
}

0 comments on commit 92fa36a

Please sign in to comment.