pavlukhin commented on a change in pull request #284:
URL: https://github.com/apache/ignite-3/pull/284#discussion_r701116454
##########
File path:
modules/client-common/src/main/java/org/apache/ignite/client/proto/ClientMessageUnpacker.java
##########
@@ -584,6 +606,92 @@ public Object unpackObject(int dataType) {
throw new IgniteException("Unknown client data type: " + dataType);
}
+ /**
+ * Packs an object.
+ *
+ * @return Object array.
+ * @throws IllegalStateException in case of unexpected value type.
+ */
+ public Object[] unpackObjectArray() {
+ assert refCnt > 0 : "Unpacker is closed";
+
+ if (tryUnpackNil())
+ return null;
+
+ int size = unpackArrayHeader();
+
+ if (size == 0)
+ return ArrayUtils.OBJECT_EMPTY_ARRAY;
+
+ Object[] args = new Object[size];
+
+ for (int i = 0; i < size; i++) {
+ MessageFormat format = getNextFormat();
+
+ switch (format) {
+ case NIL:
+ unpackNil();
+
+ break;
+ case BOOLEAN:
+ args[i] = unpackBoolean();
+
+ break;
+ case FLOAT32:
+ args[i] = unpackFloat();
+
+ break;
+ case FLOAT64:
+ args[i] = unpackDouble();
+
+ break;
+ case POSFIXINT:
+ args[i] = extractExtendedValue(unpackInt());
Review comment:
I believe a wrong mention, is not it?
--
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]