sashapolo commented on code in PR #2424:
URL: https://github.com/apache/ignite-3/pull/2424#discussion_r1293247704
##########
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 couldn't find any documentation and the tests pass, so... I'll ask the
author of this code just in case
--
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]