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

apache / commons-compress / 651 / 2
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:17PM UTC
Files 188
Run time 27min
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

11 Feb 2019 07:24PM UTC coverage: 86.431% (-0.2%) from 86.602%
651.2

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

11427 of 13221 relevant lines covered (86.43%)

0.86 hits per line

Source Files on job 651.2
  • Tree
  • List 0
  • Changed 59
  • Source Changed 1
  • Coverage Changed 59
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 634
  • Travis Job 651.2
  • fbf4defb on github
  • Prev Job for on patch-1 (#649.1)
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