diff --git a/dist/CN1aChartEngine.cn1lib b/dist/CN1aChartEngine.cn1lib index f64ac76..2dc6019 100644 Binary files a/dist/CN1aChartEngine.cn1lib and b/dist/CN1aChartEngine.cn1lib differ diff --git a/src/org/achartengine/compat/StringUtil.java b/src/org/achartengine/compat/StringUtil.java index 26e9147..b153f44 100644 --- a/src/org/achartengine/compat/StringUtil.java +++ b/src/org/achartengine/compat/StringUtil.java @@ -27,6 +27,6 @@ public static String[] split(String input, String sep){ throw new RuntimeException("Failed to find appropriate stop character"); } List parts = com.codename1.util.StringUtil.tokenize(input, sep); - return parts.toArray(new String[0]); + return parts.toArray(new String[parts.size()]); } } diff --git a/src/org/achartengine/model/XYMultipleSeriesDataset.java b/src/org/achartengine/model/XYMultipleSeriesDataset.java index ea6f900..b0c8100 100644 --- a/src/org/achartengine/model/XYMultipleSeriesDataset.java +++ b/src/org/achartengine/model/XYMultipleSeriesDataset.java @@ -104,7 +104,7 @@ public synchronized int getSeriesCount() { * @return the XY series array */ public synchronized XYSeries[] getSeries() { - return mSeries.toArray(new XYSeries[0]); + return mSeries.toArray(new XYSeries[mSeries.size()]); } } diff --git a/src/org/achartengine/renderer/DefaultRenderer.java b/src/org/achartengine/renderer/DefaultRenderer.java index 0efa964..2914ca1 100644 --- a/src/org/achartengine/renderer/DefaultRenderer.java +++ b/src/org/achartengine/renderer/DefaultRenderer.java @@ -210,7 +210,7 @@ public int getSeriesRendererCount() { * @return the simple renderers array */ public SimpleSeriesRenderer[] getSeriesRenderers() { - return mRenderers.toArray(new SimpleSeriesRenderer[0]); + return mRenderers.toArray(new SimpleSeriesRenderer[mRenderers.size()]); } /** diff --git a/src/org/achartengine/renderer/XYMultipleSeriesRenderer.java b/src/org/achartengine/renderer/XYMultipleSeriesRenderer.java index 9ea2589..3afe2ef 100644 --- a/src/org/achartengine/renderer/XYMultipleSeriesRenderer.java +++ b/src/org/achartengine/renderer/XYMultipleSeriesRenderer.java @@ -572,7 +572,7 @@ public synchronized String getXTextLabel(Double x) { * @return the X text label locations */ public synchronized Double[] getXTextLabelLocations() { - return mXTextLabels.keySet().toArray(new Double[0]); + return mXTextLabels.keySet().toArray(new Double[mXTextLabels.size()]); } /** @@ -686,7 +686,7 @@ public Double[] getYTextLabelLocations() { * @return the Y text label locations */ public synchronized Double[] getYTextLabelLocations(int scale) { - return mYTextLabels.get(scale).keySet().toArray(new Double[0]); + return mYTextLabels.get(scale).keySet().toArray(new Double[mYTextLabels.size()]); } /** diff --git a/src/org/achartengine/renderer/XYSeriesRenderer.java b/src/org/achartengine/renderer/XYSeriesRenderer.java index 2c02d88..75327ea 100644 --- a/src/org/achartengine/renderer/XYSeriesRenderer.java +++ b/src/org/achartengine/renderer/XYSeriesRenderer.java @@ -165,7 +165,7 @@ public void setFillBelowLine(boolean fill) { * @return the type of the outside fill of the line. */ public FillOutsideLine[] getFillOutsideLine() { - return mFillBelowLine.toArray(new FillOutsideLine[0]); + return mFillBelowLine.toArray(new FillOutsideLine[mFillBelowLine.size()]); } /**