You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2020/03/02 03:16:15 UTC
[james-project] 18/29: JAMES-3074 Warn against the usage of
UidValidity::of
This is an automated email from the ASF dual-hosted git repository.
btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git
commit 85535741e45aaf717a5cb7fdfc5aef3f3e18b563
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Wed Feb 26 18:09:48 2020 +0700
JAMES-3074 Warn against the usage of UidValidity::of
---
.../src/main/java/org/apache/james/mailbox/model/UidValidity.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/mailbox/api/src/main/java/org/apache/james/mailbox/model/UidValidity.java b/mailbox/api/src/main/java/org/apache/james/mailbox/model/UidValidity.java
index ce6b841..c93cb2a 100644
--- a/mailbox/api/src/main/java/org/apache/james/mailbox/model/UidValidity.java
+++ b/mailbox/api/src/main/java/org/apache/james/mailbox/model/UidValidity.java
@@ -49,6 +49,12 @@ public class UidValidity {
return ofValid(sanitizedRandomValue);
}
+ /**
+ * This method allows deserialization of potentially invalid already stored UidValidity, and should only be used for
+ * compatibility purposes.
+ *
+ * Strongly favor uses of {@link #ofValid(long)}
+ */
public static UidValidity of(long uidValidity) {
return new UidValidity(uidValidity);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org