diff --git a/pgpainless-core/src/main/java/org/pgpainless/key/util/UserId.java b/pgpainless-core/src/main/java/org/pgpainless/key/util/UserId.java index 25db7e39..3ac3d77a 100644 --- a/pgpainless-core/src/main/java/org/pgpainless/key/util/UserId.java +++ b/pgpainless-core/src/main/java/org/pgpainless/key/util/UserId.java @@ -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;