You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Keith R. Bennett (JIRA)" <ji...@apache.org> on 2007/09/10 22:38:29 UTC
[jira] Created: (TIKA-10) Remove MimeInfoException catch clauses
and import from TestParsers.
Remove MimeInfoException catch clauses and import from TestParsers.
-------------------------------------------------------------------
Key: TIKA-10
URL: https://issues.apache.org/jira/browse/TIKA-10
Project: Tika
Issue Type: Bug
Reporter: Keith R. Bennett
Several methods in the TestParsers class include catch clauses for MimeInfoException. However, they are unnecessary, and the exception class is not available at compile time. Therefore, they should be removed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (TIKA-10) Remove MimeInfoException catch clauses
and import from TestParsers.
Posted by "Keith R. Bennett (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TIKA-10?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Keith R. Bennett updated TIKA-10:
---------------------------------
Attachment: tika_10.patch
Patch file to fix TIKA-10.
> Remove MimeInfoException catch clauses and import from TestParsers.
> -------------------------------------------------------------------
>
> Key: TIKA-10
> URL: https://issues.apache.org/jira/browse/TIKA-10
> Project: Tika
> Issue Type: Bug
> Reporter: Keith R. Bennett
> Attachments: tika_10.patch
>
>
> Several methods in the TestParsers class include catch clauses for MimeInfoException. However, they are unnecessary, and the exception class is not available at compile time. Therefore, they should be removed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (TIKA-10) Remove MimeInfoException catch clauses
and import from TestParsers.
Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TIKA-10?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12527719 ]
Bertrand Delacretaz commented on TIKA-10:
-----------------------------------------
Note that while working on TIKA-19 I have removed all the catch statements in TestParsers, tests now look like:
public void testHTMLExtraction() throws Exception {
Parser parser = ParserFactory.getParser(getTestFile("testHTML.html"), tc);
assertEquals("Title : Test Indexation Html", (parser.getContent("title")).getValue());
assertEquals("text/html",parser.getMimeType());
}
I don't think it is useful to catch and log unexpected Exceptions in test cases: letting the test function throw them makes the tests fail more loudly and simplifies the test code.
> Remove MimeInfoException catch clauses and import from TestParsers.
> -------------------------------------------------------------------
>
> Key: TIKA-10
> URL: https://issues.apache.org/jira/browse/TIKA-10
> Project: Tika
> Issue Type: Bug
> Reporter: Keith R. Bennett
> Assignee: Sami Siren
> Fix For: 0.1-incubator
>
> Attachments: tika_10.patch
>
>
> Several methods in the TestParsers class include catch clauses for MimeInfoException. However, they are unnecessary, and the exception class is not available at compile time. Therefore, they should be removed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (TIKA-10) Remove MimeInfoException catch clauses
and import from TestParsers.
Posted by "Sami Siren (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/TIKA-10?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sami Siren resolved TIKA-10.
----------------------------
Resolution: Fixed
Fix Version/s: 0.1-incubator
Assignee: Sami Siren
i just committed this, thanks!
> Remove MimeInfoException catch clauses and import from TestParsers.
> -------------------------------------------------------------------
>
> Key: TIKA-10
> URL: https://issues.apache.org/jira/browse/TIKA-10
> Project: Tika
> Issue Type: Bug
> Reporter: Keith R. Bennett
> Assignee: Sami Siren
> Fix For: 0.1-incubator
>
> Attachments: tika_10.patch
>
>
> Several methods in the TestParsers class include catch clauses for MimeInfoException. However, they are unnecessary, and the exception class is not available at compile time. Therefore, they should be removed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.