AMashenkov commented on code in PR #2424:
URL: https://github.com/apache/ignite-3/pull/2424#discussion_r1293291008


##########
modules/schema/src/main/java/org/apache/ignite/internal/util/ObjectFactory.java:
##########
@@ -35,17 +36,25 @@ public class ObjectFactory<T> implements Factory<T> {
      * @throws IllegalArgumentException If no default constructor found.
      */
     public ObjectFactory(Class<T> clazz) {
-        try {
-            cnstr = clazz.getDeclaredConstructor();
-            cnstr.setAccessible(true);
-        } catch (NoSuchMethodException e) {
-            throw new IllegalArgumentException("Class has no default 
constructor: class=" + clazz.getName(), e);
+        if (clazz == Void.class) {
+            cnstr = null;

Review Comment:
   I think Void.class should never be get here, you can add an assert `assert 
clazz != Void.class`



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

Reply via email to