From abf723cc6c94a492993835a2a01d78afe789cb06 Mon Sep 17 00:00:00 2001 From: Paul Schaub Date: Wed, 4 Jan 2023 18:27:14 +0100 Subject: [PATCH] Add note about UserId.parse().toString() not guaranteing identity --- .../src/main/java/org/pgpainless/key/util/UserId.java | 2 ++ 1 file changed, 2 insertions(+) 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 03a50321..427f9060 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 @@ -96,6 +96,8 @@ public final class UserId implements CharSequence { *
  • " "@example.org
    (spaces between the quotes)
  • *
  • "very.(),:;<>[]\".VERY.\"very@\\ \"very\".unusual"@strange.example.com
  • * + * Note: This method does not guarantee that
    string.equals(UserId.parse(string).toString())
    is true. + * For example,
    UserId.parse("alice@pgpainless.org").toString()
    wraps the mail address in angled brackets. * * @see RFC5322 ยง3.4. Address Specification * @param string user-id