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

bugsnag / bugsnag-android / 706 / 3
69%
master: 83%

Build:
Build:
LAST BUILD BRANCH: renovate/gradle-5.x
DEFAULT BRANCH: master
Ran 11 Apr 2019 06:31PM UTC
Files 49
Run time 2s
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 Apr 2019 09:53AM UTC coverage: 74.004%. First build
NDK_VERSION=r12b

push

travis-ci-com

fractalwrench
refactor: prefer using zero-based array when converting collection

There are two styles to convert a collection to an array: either using a pre-sized array (like c.toArray(new String[c.size()])) or using an empty array (like c.toArray(new String[0]).

In older Java versions using pre-sized array was recommended, as the reflection call which is necessary to create an array of proper size was quite slow. However since late updates of OpenJDK 6 this call was intrinsified, making the performance of the empty array version the same and sometimes even better, compared to the pre-sized version. Also passing pre-sized array is dangerous for a concurrent or synchronized collection as a data race is possible between the size and toArray call which may result in extra nulls at the end of the array, if the collection was concurrently shrunk during the operation.

This inspection allows to follow the uniform style: either using an empty array (which is recommended in modern Java) or using a pre-sized array (which might be faster in older Java versions or non-HotSpot based JVMs).

2266 of 3062 relevant lines covered (74.0%)

0.74 hits per line

Source Files on job 706.3 (NDK_VERSION=r12b)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1961
  • Travis Job 706.3
  • c94bbcec on github
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