LiangliangSui commented on code in PR #1406:
URL: https://github.com/apache/incubator-fury/pull/1406#discussion_r1527918514
##########
java/fury-core/src/main/java/org/apache/fury/resolver/ClassResolver.java:
##########
@@ -229,8 +228,9 @@ public class ClassResolver {
private final ShimDispatcher shimDispatcher;
private static class ExtRegistry {
- private short registeredClassIdCounter = 0;
- private final LongMap<Class<?>> registeredId2Classes = new
LongMap<>(initialCapacity);
+ // Here we set it to 1 because `NO_CLASS_ID` is 0 to avoid calculating it
again in
+ // `register(Class<?> cls)`.
+ private short registeredClassIdCounter = 1;
Review Comment:
Updated.
--
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]