quantranhong1999 commented on a change in pull request #391:
URL: https://github.com/apache/james-project/pull/391#discussion_r629109068



##########
File path: 
server/protocols/jmap-rfc-8621/src/main/scala/org/apache/james/jmap/change/StateChange.scala
##########
@@ -44,10 +41,7 @@ case object MailboxTypeName extends TypeName {
     case _ => None
   }
 
-  override def parseState(string: String): Either[IllegalArgumentException, 
UuidState] = Try(UUID.fromString(string))
-    .toEither
-    .map(UuidState(_))
-    .left.map(new IllegalArgumentException(_))
+  override def parseState(string: String): Either[IllegalArgumentException, 
UuidState] = UuidState.parse(string)

Review comment:
       That is why I am doing this PR: to make TypeState(CustomTypeName -> 
CustomState) customization is able.
   Every state now should not tied to Uuid State, cause we have some custom 
State like FilterState(which is parsed from Integer).




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to