chaokunyang commented on code in PR #2852:
URL: https://github.com/apache/fory/pull/2852#discussion_r2480370178


##########
java/fory-core/src/main/java/org/apache/fory/resolver/TypeResolver.java:
##########
@@ -111,6 +111,14 @@ protected TypeResolver(Fory fory) {
     metaStringResolver = fory.getMetaStringResolver();
   }
 
+  protected final void checkRegisterAllowed() {
+    if (fory.getDepth() >= 0) {
+      throw new IllegalStateException(
+          "Cannot register class/serializer after 
serialization/deserialization has started. "
+              + "Please register all classes before using Fory.");

Review Comment:
   ```suggestion
                 + "Please register all classes before invoking 
`serialize/deserialize` methods of Fory.");
   ```



-- 
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.

To unsubscribe, e-mail: [email protected]

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