You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Niall Pemberton (JIRA)" <ji...@apache.org> on 2007/11/26 03:02:43 UTC
[jira] Created: (TIKA-104) Add utility methods to throw IOException
with the caused intialized
Add utility methods to throw IOException with the caused intialized
-------------------------------------------------------------------
Key: TIKA-104
URL: https://issues.apache.org/jira/browse/TIKA-104
Project: Tika
Issue Type: Improvement
Components: general
Reporter: Niall Pemberton
Priority: Minor
The constructors with a Throwable cause were not added until JDK 1.6 - I suggest adding a utility method to intialize the cause in the IOException.
This can be used to revert r596143[1] (and similar situation in AppendableApdaptor) so that the cause is not swallowed.
[1] http://svn.apache.org/viewvc?view=rev&revision=596143
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (TIKA-104) Add utility methods to throw
IOException with the caused intialized
Posted by "Chris A. Mattmann (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TIKA-104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chris A. Mattmann reassigned TIKA-104:
--------------------------------------
Assignee: Chris A. Mattmann
> Add utility methods to throw IOException with the caused intialized
> -------------------------------------------------------------------
>
> Key: TIKA-104
> URL: https://issues.apache.org/jira/browse/TIKA-104
> Project: Tika
> Issue Type: Improvement
> Components: general
> Reporter: Niall Pemberton
> Assignee: Chris A. Mattmann
> Priority: Minor
> Attachments: TIKA-104-throwIOException-v1.patch
>
>
> The constructors with a Throwable cause were not added until JDK 1.6 - I suggest adding a utility method to intialize the cause in the IOException.
> This can be used to revert r596143[1] (and similar situation in AppendableApdaptor) so that the cause is not swallowed.
> [1] http://svn.apache.org/viewvc?view=rev&revision=596143
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (TIKA-104) Add utility methods to throw IOException
with the caused intialized
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TIKA-104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton updated TIKA-104:
---------------------------------
Attachment: TIKA-104-throwIOException-v1.patch
Attaching a patch which adds new throwIOException() method to the Utils class - and modifies PDF2XHTML and AppendableAdaptor to use the new methods. Please note the a new "utils" directory in the test source needs to be added before this patch can be applied.
> Add utility methods to throw IOException with the caused intialized
> -------------------------------------------------------------------
>
> Key: TIKA-104
> URL: https://issues.apache.org/jira/browse/TIKA-104
> Project: Tika
> Issue Type: Improvement
> Components: general
> Reporter: Niall Pemberton
> Priority: Minor
> Attachments: TIKA-104-throwIOException-v1.patch
>
>
> The constructors with a Throwable cause were not added until JDK 1.6 - I suggest adding a utility method to intialize the cause in the IOException.
> This can be used to revert r596143[1] (and similar situation in AppendableApdaptor) so that the cause is not swallowed.
> [1] http://svn.apache.org/viewvc?view=rev&revision=596143
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TIKA-104) Add utility methods to throw
IOException with the caused intialized
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TIKA-104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12553986 ]
Niall Pemberton commented on TIKA-104:
--------------------------------------
Yes thats much better and +1 to adding to Commons IO - I've created a Jira ticket IO-148 so that it doesn't get forgotten. You should have karma for Commons now - but if you don't get round to adding it, I'll probably jump in a copy it accross some time.
> Add utility methods to throw IOException with the caused intialized
> -------------------------------------------------------------------
>
> Key: TIKA-104
> URL: https://issues.apache.org/jira/browse/TIKA-104
> Project: Tika
> Issue Type: Improvement
> Components: general
> Reporter: Niall Pemberton
> Assignee: Jukka Zitting
> Priority: Minor
> Fix For: 0.1-incubator
>
> Attachments: TIKA-104-throwIOException-v1.patch
>
>
> The constructors with a Throwable cause were not added until JDK 1.6 - I suggest adding a utility method to intialize the cause in the IOException.
> This can be used to revert r596143[1] (and similar situation in AppendableApdaptor) so that the cause is not swallowed.
> [1] http://svn.apache.org/viewvc?view=rev&revision=596143
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (TIKA-104) Add utility methods to throw
IOException with the caused intialized
Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TIKA-104?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jukka Zitting resolved TIKA-104.
--------------------------------
Resolution: Fixed
Fix Version/s: 0.1-incubator
Assignee: Jukka Zitting (was: Chris A. Mattmann)
I think an IOException subclass is a cleaner way to do this, as it doesn't introduce an extra frame in the exception stack trace.
I implemented a new CauseIOException class for this and committed the adapted patch in revision 606139. Feel free to override if you think the util method approach is better for this.
Thanks, Niall, for this improvement! We should probably get the utils method or CauseIOException included in commons-io, where it could better be reused by other projects. I'll take a look at that.
> Add utility methods to throw IOException with the caused intialized
> -------------------------------------------------------------------
>
> Key: TIKA-104
> URL: https://issues.apache.org/jira/browse/TIKA-104
> Project: Tika
> Issue Type: Improvement
> Components: general
> Reporter: Niall Pemberton
> Assignee: Jukka Zitting
> Priority: Minor
> Fix For: 0.1-incubator
>
> Attachments: TIKA-104-throwIOException-v1.patch
>
>
> The constructors with a Throwable cause were not added until JDK 1.6 - I suggest adding a utility method to intialize the cause in the IOException.
> This can be used to revert r596143[1] (and similar situation in AppendableApdaptor) so that the cause is not swallowed.
> [1] http://svn.apache.org/viewvc?view=rev&revision=596143
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.