Index: Arc2D.java =================================================================== --- Arc2D.java (revision 441002) +++ Arc2D.java (working copy) @@ -486,6 +486,9 @@ } public void setArcType(int type) { + if (type != OPEN && type != CHORD && type != PIE) { + throw new IllegalArgumentException("Invalid type of Arc: " + type); + } this.type = type; }