Closedown

This commit is contained in:
gac-x12sa
2022-12-23 15:39:33 +01:00
parent 6266156e89
commit 4d616ee0e0

View File

@@ -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<String, Object> 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){