You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Benson Margulies (JIRA)" <ji...@apache.org> on 2011/02/14 19:30:57 UTC

[jira] Created: (TIKA-597) Bogus exception handler in org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream)

Bogus exception handler in org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream)
-----------------------------------------------------------------------------------------------------------

                 Key: TIKA-597
                 URL: https://issues.apache.org/jira/browse/TIKA-597
             Project: Tika
          Issue Type: Bug
          Components: parser
    Affects Versions: 0.8
            Reporter: Benson Margulies


org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream) 

contains an exception handler that calls printStackTrace instead of rethrowing
as a RuntimeException. Should it be 'throws TikaException' in any case?


-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (TIKA-597) Bogus exception handler in org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream)

Posted by "Julien Nioche (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TIKA-597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julien Nioche reassigned TIKA-597:
----------------------------------

    Assignee: Julien Nioche  (was: Chris A. Mattmann)

> Bogus exception handler in org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream)
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: TIKA-597
>                 URL: https://issues.apache.org/jira/browse/TIKA-597
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 0.8
>            Reporter: Benson Margulies
>            Assignee: Julien Nioche
>         Attachments: TIKA-597.patch
>
>
> org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream) 
> contains an exception handler that calls printStackTrace instead of rethrowing
> as a RuntimeException. Should it be 'throws TikaException' in any case?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (TIKA-597) Bogus exception handler in org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream)

Posted by "Chris A. Mattmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TIKA-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001530#comment-13001530 ] 

Chris A. Mattmann commented on TIKA-597:
----------------------------------------

Thanks Julien+Benson -- this fell off my radar :(

> Bogus exception handler in org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream)
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: TIKA-597
>                 URL: https://issues.apache.org/jira/browse/TIKA-597
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 0.8
>            Reporter: Benson Margulies
>            Assignee: Julien Nioche
>             Fix For: 1.0
>
>         Attachments: TIKA-597.patch
>
>
> org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream) 
> contains an exception handler that calls printStackTrace instead of rethrowing
> as a RuntimeException. Should it be 'throws TikaException' in any case?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Resolved: (TIKA-597) Bogus exception handler in org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream)

Posted by "Julien Nioche (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TIKA-597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Julien Nioche resolved TIKA-597.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0

Committed revision 1076300

Thanks Benson

> Bogus exception handler in org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream)
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: TIKA-597
>                 URL: https://issues.apache.org/jira/browse/TIKA-597
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 0.8
>            Reporter: Benson Margulies
>            Assignee: Julien Nioche
>             Fix For: 1.0
>
>         Attachments: TIKA-597.patch
>
>
> org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream) 
> contains an exception handler that calls printStackTrace instead of rethrowing
> as a RuntimeException. Should it be 'throws TikaException' in any case?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (TIKA-597) Bogus exception handler in org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream)

Posted by "Julien Nioche (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TIKA-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001497#comment-13001497 ] 

Julien Nioche commented on TIKA-597:
------------------------------------

Benson, 

I can't see any TikaRuntimeException in the current SVN (Revision: 1076294). This could be a nice addition, would you mind opening a separate issue for it so that people can discuss the pros/cons?

Will embed the TikaException in a RuntimeException for now.

Thanks

Julien

> Bogus exception handler in org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream)
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: TIKA-597
>                 URL: https://issues.apache.org/jira/browse/TIKA-597
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 0.8
>            Reporter: Benson Margulies
>            Assignee: Julien Nioche
>         Attachments: TIKA-597.patch
>
>
> org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream) 
> contains an exception handler that calls printStackTrace instead of rethrowing
> as a RuntimeException. Should it be 'throws TikaException' in any case?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (TIKA-597) Bogus exception handler in org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream)

Posted by "Chris A. Mattmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TIKA-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994481#comment-12994481 ] 

Chris A. Mattmann commented on TIKA-597:
----------------------------------------

Thanks Benson, yep I saw it. I'll take a look, thanks!

> Bogus exception handler in org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream)
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: TIKA-597
>                 URL: https://issues.apache.org/jira/browse/TIKA-597
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 0.8
>            Reporter: Benson Margulies
>            Assignee: Chris A. Mattmann
>         Attachments: TIKA-597.patch
>
>
> org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream) 
> contains an exception handler that calls printStackTrace instead of rethrowing
> as a RuntimeException. Should it be 'throws TikaException' in any case?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (TIKA-597) Bogus exception handler in org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream)

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TIKA-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12994455#comment-12994455 ] 

Benson Margulies commented on TIKA-597:
---------------------------------------

I made you a patch.

> Bogus exception handler in org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream)
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: TIKA-597
>                 URL: https://issues.apache.org/jira/browse/TIKA-597
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 0.8
>            Reporter: Benson Margulies
>            Assignee: Chris A. Mattmann
>         Attachments: TIKA-597.patch
>
>
> org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream) 
> contains an exception handler that calls printStackTrace instead of rethrowing
> as a RuntimeException. Should it be 'throws TikaException' in any case?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Assigned: (TIKA-597) Bogus exception handler in org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream)

Posted by "Chris A. Mattmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TIKA-597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris A. Mattmann reassigned TIKA-597:
--------------------------------------

    Assignee: Chris A. Mattmann

> Bogus exception handler in org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream)
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: TIKA-597
>                 URL: https://issues.apache.org/jira/browse/TIKA-597
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 0.8
>            Reporter: Benson Margulies
>            Assignee: Chris A. Mattmann
>         Attachments: TIKA-597.patch
>
>
> org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream) 
> contains an exception handler that calls printStackTrace instead of rethrowing
> as a RuntimeException. Should it be 'throws TikaException' in any case?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (TIKA-597) Bogus exception handler in org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream)

Posted by "Benson Margulies (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TIKA-597?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benson Margulies updated TIKA-597:
----------------------------------

    Attachment: TIKA-597.patch

> Bogus exception handler in org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream)
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: TIKA-597
>                 URL: https://issues.apache.org/jira/browse/TIKA-597
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 0.8
>            Reporter: Benson Margulies
>         Attachments: TIKA-597.patch
>
>
> org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream) 
> contains an exception handler that calls printStackTrace instead of rethrowing
> as a RuntimeException. Should it be 'throws TikaException' in any case?

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Commented: (TIKA-597) Bogus exception handler in org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream)

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TIKA-597?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13004621#comment-13004621 ] 

Jukka Zitting commented on TIKA-597:
------------------------------------

I don't think the parse() method should ever intentionally throw RuntimeExceptions. Thus in revision 1079857 I modified the code to use the declared Mime- instead of RuntimeExceptions to wrap potential Tika- and SAXExceptions.

I also added code to unwrap such exceptions where appropriate. This allows the original exceptions to pass through the call chain even if only MimeExceptions are declared for one segment of that chain.

> Bogus exception handler in org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream)
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: TIKA-597
>                 URL: https://issues.apache.org/jira/browse/TIKA-597
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 0.8
>            Reporter: Benson Margulies
>            Assignee: Julien Nioche
>             Fix For: 1.0
>
>         Attachments: TIKA-597.patch
>
>
> org.apache.tika.parser.mail.MailContentHandler.body(BodyDescriptor, InputStream) 
> contains an exception handler that calls printStackTrace instead of rethrowing
> as a RuntimeException. Should it be 'throws TikaException' in any case?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira