Hi,

  Sure I will post a ticket/patch for this bug, but it will be just a
little local fix. What I tried to say you is that the part of POI for
msword extraction is not stable. I didn't understand what kind of
idioms you follow in this part (avoid unnecessary try/catch or low
level api for byte portions processing). But the result is that
trivial errors occurrences and extracted data is loosed. That is a
problem.
  Let's see what the bible (Effective Java 2nd ed, chap 9 item 58)
says about that :

 The great majority of runtime exceptions indicate precondition
violations. A precondition viola-
tion is simply a failure by the client of an API to adhere to the
contract established
by the API specification. For example, the contract for array access
specifies that
the array index must be between zero and the array length minus one. ArrayIn-
dexOutOfBoundsException indicates that this precondition was violated.

  The question is who violate this precondition and how many times ?
If your approach don't cover you against this kind of violation,
modify the approach. As simple user I can indicate or modify the
places in your code where this situation occurs but it will be never
enough. I can't enter in you mind and make you change the idioms you
using, it's your job. You have designed and implemented the biggest
part of this module. Thanks.


2011/5/23 Nick Burch <[email protected]>:
> On Mon, 23 May 2011, Victor Bartel wrote:
>>
>>  Last week I had some troubles with WordExtractor on POI 3.7 /
>> 3.8beta2. Library throws ArrayIndexOutOfBoundsException during tabular
>> data parsing and extraction. I've analysed the part of source code
>> that throw this exception, especially ListTables constructor. This
>> part represents low-level data manipulation / extraction API that deal
>> with arrays of bytes. When you are not in perfect word et you need to
>> works with 3rd users supplied data you have a risk to "meet" not
>> correct data and produce a lot of errors. To avoid a such of situation
>> you can use try / catch blocks.
>
> Normally if you get an ArrayIndexOutOfBoundsException from the bowels of the
> library then that's a sign that there's an incorrect assumption somewhere in
> the code. The prefered fix is to identify that mistake, and fix it, rather
> than blindly ignoring the problem.
>
> It sounds like you've done a fair bit of debugging on this, have you been
> able to identify what's going wrong? If so, please open a new bug in
> bugzilla and upload the patch!
>
> Nick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>



-- 
Best regards,
Victor Bartel

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to