• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

apache / commons-compress / 651
87%
master: 86%

Build:
Build:
LAST BUILD BRANCH: feature/COMPRESS-602_migrate_zip_package_to_nio_path
DEFAULT BRANCH: master
Ran 11 Feb 2019 08:16PM UTC
Jobs 3
Files 188
Run time 50min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
651

Pull #74

travis-ci

web-flow
Removed incorrect use of InputStream.available() in ArArchiveInputStream

The original code appears to be checking for end-of-file
using the InputStream.available() method.

This however, misunderstands the InputStream API. The available()
method only returns an estimate, and cannot be used
to check for the remaining bytes in the file. From the documentation:

> Returns an estimate of the number of bytes that can be read (or
> skipped over) from this input stream without blocking by the next
> invocation of a method for this input stream. The next invocation
> might be the same thread or another thread.  A single read or skip of this
> many bytes will not block, but may read or skip fewer bytes.
> Note that while some implementations of InputStream will return
> the total number of bytes in the stream, many will not.  It is
> never correct to use the return value of this method to allocate
> a buffer intended to hold all data in this stream.

This patch includes a unit test that demonstrates the bug and
verifies the fix.
Pull Request #74: Removed incorrect use of InputStream.available() in ArArchiveInputStream

2 of 2 new or added lines in 1 file covered. (100.0%)

11203 of 12934 relevant lines covered (86.62%)

2.6 hits per line

Jobs
ID Job ID Ran Files Coverage
1 651.1 11 Feb 2019 08:16PM UTC 0
86.6
Travis Job 651.1
2 651.2 11 Feb 2019 08:16PM UTC 0
86.43
Travis Job 651.2
3 651.3 11 Feb 2019 08:17PM UTC 0
86.43
Travis Job 651.3
Source Files on build 651
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #651
  • Pull Request #74
  • PR Base - master (#649)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc