Bug 9426

Summary: [PATCH] New Exception - IllegalPropertySetDataException
Product: POI Reporter: Drew Varner <drew.varner>
Component: HPSFAssignee: POI Developers List <dev>
Status: CLOSED FIXED    
Severity: normal    
Priority: P3    
Version: 2.0-dev   
Target Milestone: ---   
Hardware: Other   
OS: other   
Attachments: Diffs on Property.java to add IllegalPropertySetDataException
new class, IllegalPropertySetDataException

Description Drew Varner 2002-05-26 19:13:53 UTC
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
Comment 1 Drew Varner 2002-05-26 19:14:40 UTC
Created attachment 1948 [details]
Diffs on Property.java to add IllegalPropertySetDataException
Comment 2 Drew Varner 2002-05-26 19:14:59 UTC
Created attachment 1949 [details]
new class, IllegalPropertySetDataException
Comment 3 Andy Oliver 2002-05-26 22:19:24 UTC
applied, drew please cross check.  (also please start making sure you add
yourself in teh @author tags)
Comment 4 Andy Oliver 2002-05-26 22:20:47 UTC
applied, drew please cross check.  (also please start making sure you add
yourself in teh @author tags)