From 4c1d359971106124f2c0c68eb61836a8886d3651 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Wed, 30 Nov 2022 15:35:31 +0100 Subject: [PATCH] Deprecate UserId.asString() --- .../java/org/pgpainless/key/util/UserId.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) 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;