diff --git a/redisson/src/main/java/org/redisson/RedissonLiveObjectService.java b/redisson/src/main/java/org/redisson/RedissonLiveObjectService.java index c6e129b05..250e77003 100644 --- a/redisson/src/main/java/org/redisson/RedissonLiveObjectService.java +++ b/redisson/src/main/java/org/redisson/RedissonLiveObjectService.java @@ -588,7 +588,7 @@ public class RedissonLiveObjectService implements RLiveObjectService { private T instantiate(Class cls, K id) throws Exception { for (Constructor constructor : cls.getDeclaredConstructors()) { - if (constructor.getParameterCount() == 0) { + if (constructor.getParameterTypes().length == 0) { constructor.setAccessible(true); return (T) constructor.newInstance(); }