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

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

Build:
Build:
LAST BUILD BRANCH: renovate/gradle-5.x
DEFAULT BRANCH: master
Ran 11 Apr 2019 06:31PM UTC
Jobs 3
Files 50
Run time 20min
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
706

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 3286 relevant lines covered (68.96%)

2.07 hits per line

Jobs
ID Job ID Ran Files Coverage
3 706.3 (NDK_VERSION=r12b) 11 Apr 2019 06:31PM UTC 0
74.0
Travis Job 706.3
4 706.4 (NDK_VERSION=r16b) 11 Apr 2019 06:43PM UTC 0
74.0
Travis Job 706.4
5 706.5 (NDK_VERSION=r19) 11 Apr 2019 06:52PM UTC 0
74.0
Travis Job 706.5
Source Files on build 706
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #706
  • 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