1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-12-23 03:17:58 +01:00

Deprecate UserId.asString()

This commit is contained in:
Paul Schaub 2022-11-30 15:35:31 +01:00
parent b0c283e143
commit 4c1d359971

View file

@ -119,14 +119,6 @@ public final class UserId implements CharSequence {
@Override @Override
public @Nonnull String toString() { public @Nonnull String toString() {
return asString();
}
/**
* Returns a string representation of the object.
* @return a string representation of the object.
*/
public String asString() {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
if (name != null && !name.isEmpty()) { if (name != null && !name.isEmpty()) {
sb.append(name); sb.append(name);
@ -146,6 +138,16 @@ public final class UserId implements CharSequence {
return sb.toString(); return sb.toString();
} }
/**
* Returns a string representation of the object.
* @return a string representation of the object.
* @deprecated use {@link #toString()} instead.
*/
@Deprecated
public String asString() {
return toString();
}
@Override @Override
public boolean equals(Object o) { public boolean equals(Object o) {
if (o == null) return false; if (o == null) return false;