tika-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (TIKA-2637) ParsingReader.read throws exception when no bytes are available
Date Tue, 11 Dec 2018 17:23:00 GMT

    [ https://issues.apache.org/jira/browse/TIKA-2637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16717600#comment-16717600
] 

Hudson commented on TIKA-2637:
------------------------------

SUCCESS: Integrated in Jenkins build tika-branch-1x #140 (See [https://builds.apache.org/job/tika-branch-1x/140/])
TIKA-2637 -- ParsingReader should return -1 for a zero byte file (tallison: [https://github.com/apache/tika/commit/df5792e5f7da6d12a8c4bc8a3684632f70446eeb])
* (edit) tika-parsers/src/test/java/org/apache/tika/parser/ParsingReaderTest.java
* (edit) tika-core/src/main/java/org/apache/tika/parser/ParsingReader.java


> ParsingReader.read throws exception when no bytes are available
> ---------------------------------------------------------------
>
>                 Key: TIKA-2637
>                 URL: https://issues.apache.org/jira/browse/TIKA-2637
>             Project: Tika
>          Issue Type: Bug
>            Reporter: Boris Petrov
>            Assignee: Tim Allison
>            Priority: Critical
>             Fix For: 2.0.0, 1.20
>
>
> Calling ParsingReader.read on an "empty" reader throws an exception:
> {noformat}
> org.apache.tika.exception.ZeroByteFileException: InputStream must have > 0 bytes
> {noformat}
> However, according to the Reader documentation:
> {noformat}
> Returns:
> The number of characters read, or -1 if the end of the stream has been reached
> {noformat}
> So this method should return a -1 instead.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message