Skip to content
Snippets Groups Projects
Commit 27357790 authored by Guillaume PICHON's avatar Guillaume PICHON
Browse files

Correction of a bug when the result is an empty vector

parent 96454f8a
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,7 @@
<groupId>fr.soleil.deviceservers</groupId>
<artifactId>TangoParser</artifactId>
<version>3.3.10</version>
<version>3.3.11</version>
<name>TangoParser</name>
<description>TangoParser Device</description>
......
......@@ -375,9 +375,13 @@ public abstract class AJepParser {
Object result = value;
if (value instanceof MVector) {
final MVector vect = (MVector) value;
Class<? extends Object> clazz = vect.getEle(0).getClass();
Class<? extends Object> clazz;
if(vect.getNumEles()>0) {
clazz = vect.getEle(0).getClass();
} else {
clazz = Object.class; //We don't care of the type if it's empty.
}
result = Array.newInstance(clazz, vect.getNumEles());
// result = new Object[vect.getNumEles()];
for (int j = 0; j < vect.getNumEles(); j++) {
Array.set(result, j, vect.getEle(j));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment