From 4d616ee0e0b2488b7b4d07f4d192c9031be6eff9 Mon Sep 17 00:00:00 2001 From: gac-x12sa Date: Fri, 23 Dec 2022 15:39:33 +0100 Subject: [PATCH] Closedown --- plugins/Array10.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/Array10.java b/plugins/Array10.java index 52c2775..b257b46 100644 --- a/plugins/Array10.java +++ b/plugins/Array10.java @@ -12,6 +12,7 @@ import ch.psi.utils.Type; import java.io.IOException; import java.lang.reflect.Array; import java.nio.charset.StandardCharsets; +import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import java.util.logging.Level; @@ -148,7 +149,7 @@ public class Array10 extends DeviceBase implements Readable, Cacheable, Readable try{ String json = new String(header_arr, StandardCharsets.UTF_8); Map header = (Map) EncoderJson.decode(json, Map.class); - int[] shape = (int[]) header.getOrDefault("shape", null); + int[] shape = (int[]) Convert.toPrimitiveArray(header.getOrDefault("shape", new ArrayList()), int.class); String dtype = (String) header.getOrDefault("type", "int8"); byte[] data_arr = socket.recv(); if (data_arr!=null){