diff --git a/projects/Chart/19/org/jfree/chart/plot/CategoryPlot.java b/projects/Chart/19/org/jfree/chart/plot/CategoryPlot.java index cf3f52f..ec31907 100644 --- a/projects/Chart/19/org/jfree/chart/plot/CategoryPlot.java +++ b/projects/Chart/19/org/jfree/chart/plot/CategoryPlot.java @@ -695,6 +695,9 @@ public void setDomainAxes(CategoryAxis[] axes) { * @since 1.0.3 */ public int getDomainAxisIndex(CategoryAxis axis) { + if (axis == null) { + throw new IllegalArgumentException("Null 'axis' argument."); + } return this.domainAxes.indexOf(axis); } @@ -970,6 +973,9 @@ public void setRangeAxes(ValueAxis[] axes) { * @since 1.0.7 */ public int getRangeAxisIndex(ValueAxis axis) { + if (axis == null) { + throw new IllegalArgumentException("Null 'axis' argument."); + } int result = this.rangeAxes.indexOf(axis); if (result < 0) { // try the parent plot Plot parent = getParent();