1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-12-22 19:08:00 +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
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();
if (name != null && !name.isEmpty()) {
sb.append(name);
@ -146,6 +138,16 @@ public final class UserId implements CharSequence {
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
public boolean equals(Object o) {
if (o == null) return false;