This patch adds a new exception, IllegalPropertySetDataException. Use this when an illegal value shows up in a PropertySet. Per Andy's recommendations in comments. cvs diff -u *****CVS exited normally with code 1***** ? IllegalPropertySetDataException.java cvs server: Diffing . Index: Property.java =================================================================== RCS file: /home/cvspublic/jakarta- poi/src/java/org/apache/poi/hpsf/Property.java,v retrieving revision 1.6 diff -u -r1.6 Property.java --- Property.java 11 May 2002 14:47:23 -0000 1.6 +++ Property.java 26 May 2002 19:10:19 -0000 @@ -63,7 +63,7 @@ package org.apache.poi.hpsf; import java.util.*; -import org.apache.poi.util.LittleEndian; +import org.apache.poi.util.LittleEndian; /** * <p> @@ -257,13 +257,7 @@ } else if (bool == 0) { value = new Boolean(false); } else { - /* - * FIXME: Someone might invent a new - * HPSFRuntimeException subclass - * IllegalPropertySetDataException for this and - * similar cases. - */ - throw new HPSFRuntimeException + throw new IllegalPropertySetDataException ("Illegal property set data: A boolean must be " + "either -1 (true) or 0 (false)."); } cvs server: Diffing wellknown
Created attachment 1948 [details] Diffs on Property.java to add IllegalPropertySetDataException
Created attachment 1949 [details] new class, IllegalPropertySetDataException
applied, drew please cross check. (also please start making sure you add yourself in teh @author tags)