Commit 736e2e23 authored by patrick.lambert's avatar patrick.lambert
Browse files

bug fixes in List.toArray

parent 88428a8d
......@@ -84,6 +84,7 @@ public abstract class RIOBasinNetwork extends BasinNetwork {
}
@Override
public InshoreBasin[] getInshoreBasins() {
return inshoreBasins;
}
......@@ -100,7 +101,7 @@ public abstract class RIOBasinNetwork extends BasinNetwork {
if (basin.getFunction() == OffshoreBasinFunction.WINTERING)
winteringBasins.add(basin);
}
return (OffshoreBasin[]) winteringBasins.toArray();
return winteringBasins.toArray(new OffshoreBasin[winteringBasins.size()]);
}
......@@ -131,7 +132,7 @@ public abstract class RIOBasinNetwork extends BasinNetwork {
if (basin.getFunction() == OffshoreBasinFunction.SUMMERING)
summeringBasins.add(basin);
}
return (OffshoreBasin[]) summeringBasins.toArray();
return summeringBasins.toArray(new OffshoreBasin[summeringBasins.size()]);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment