File tree Expand file tree Collapse file tree 3 files changed +4
-8
lines changed
lib-ogc/swe-common-core/src/main/java/org/vast/data Expand file tree Collapse file tree 3 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,8 @@ public void setData(DataBlock dataBlock)
149
149
{
150
150
for (int i = 0 ; i < fieldList .size (); i ++)
151
151
{
152
- AbstractDataBlock childBlock = ((DataBlockParallel )dataBlock ).blockArray [i ];
152
+ AbstractDataBlock childBlock = ((DataBlockParallel )dataBlock ).blockArray [i ].copy ();
153
+ childBlock .startIndex = ((DataBlockParallel )dataBlock ).startIndex ;
153
154
((AbstractDataComponentImpl )fieldList .get (i )).setData (childBlock );
154
155
}
155
156
}
Original file line number Diff line number Diff line change @@ -72,12 +72,7 @@ public DataBlockParallel copy()
72
72
{
73
73
DataBlockParallel newBlock = new DataBlockParallel ();
74
74
newBlock .startIndex = this .startIndex ;
75
- newBlock .blockArray = new AbstractDataBlock [blockArray .length ];
76
-
77
- // shallow copy all blocks in the array
78
- for (int i =0 ; i <blockArray .length ; i ++)
79
- newBlock .blockArray [i ] = this .blockArray [i ].copy ();
80
-
75
+ newBlock .blockArray = this .blockArray ;
81
76
newBlock .atomCount = this .atomCount ;
82
77
return newBlock ;
83
78
}
Original file line number Diff line number Diff line change @@ -344,7 +344,7 @@ public IDataAccessor next()
344
344
{
345
345
var elt = array .getComponent (idx ++);
346
346
var accessor = createElementProxy (clazz , array .getElementType ());
347
- accessor .wrap (elt .getData ());
347
+ accessor .wrap (elt .getData (). copy () );
348
348
return accessor ;
349
349
}
350
350
};
You can’t perform that action at this time.
0 commit comments