poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 27929] - [PATCH] Opening XLS file with drop down list throws ArrayIndexOutofBoundsException
Date Thu, 08 Jul 2004 19:27:31 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=27929>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=27929

[PATCH] Opening XLS file with drop down list throws ArrayIndexOutofBoundsException





------- Additional Comments From marcus.sundman@iki.fi  2004-07-08 19:27 -------
Stuff like this is extremely ugly on more than one level (copy'n'paste from org.
apache.poi.hssf.record.RecordFactory.createRecord):
--------8<---------------------------------------------------
   catch (Exception introspectionException)
   {
      introspectionException.printStackTrace();
      throw new RecordFormatException("...");
   }
-------->8---------------------------------------------------

Instead you should do it like this:
--------8<---------------------------------------------------
   catch (Exception introspectionException)
   {
      RecordFormatException rfe = new RecordFormatException("...");
      rfe.initCause(introspectionException);
      throw rfe;
   }
-------->8---------------------------------------------------

Or even better, make a new constructor in RecordFormatException:
--------8<---------------------------------------------------
   public RecordFormatException(String message, Throwable cause)
   {
      super(exception, cause);
   }

[and then]

   catch (Exception introspectionException)
   {
      throw new RecordFormatException("...", introspectionException);
   }
-------->8---------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: poi-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: poi-dev-help@jakarta.apache.org


Mime
View raw message