chaokunyang commented on code in PR #2012:
URL: https://github.com/apache/fury/pull/2012#discussion_r1935534625


##########
java/fury-core/src/main/java/org/apache/fury/resolver/ClassResolver.java:
##########
@@ -1674,6 +1674,33 @@ public ClassInfo readClassInfo(MemoryBuffer buffer) {
     return classInfo;
   }
 
+  public ClassInfo readClassInfo(MemoryBuffer buffer, Class<?> targetClass) {
+    if (metaContextShareEnabled) {
+      ClassInfo classInfo = readClassInfoWithMetaShare(buffer, 
fury.getSerializationContext().getMetaContext());
+
+      // replace target class if needed
+      if (!targetClass.getName().equals(classInfo.getCls().getName())) {

Review Comment:
   ```suggestion
         if (targetClass != classInfo.getCls()) {
   ```
   
   this will be much faster



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