DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9426>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9426

[PATCH] New Exception - IllegalPropertySetDataException

           Summary: [PATCH] New Exception - IllegalPropertySetDataException
           Product: POI
           Version: unspecified
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: HPFS
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to