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

jcgay / maven-profiler / #284 / 1
87%
master: 87%

Build:
DEFAULT BRANCH: master
Ran 20 Apr 2025 06:02PM UTC
Files 25
Run time 0s
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

20 Apr 2025 06:01PM UTC coverage: 86.512% (-0.4%) from 86.916%
#284.1

push

jcgay
Prevent NPE when extension is initiated after another one

When maven-profiler is installed in the Maven distribution ext folder
and a project uses other extension from the .mvn/extensions.xml configuration,
maven-profiler was failing with NPE in fr.jcgay.maven.profiler.ProfilerEventSpy#onEvent.

This is because the #init method of the extension was not yet called when Maven was loading
extension from .mvn/extensions.xml. Maven was firing event intercepted by maven-profiler
but as it was not yet initiated, the configuration and statistics internal state was not ready.

This commit also initiate its state in the constructor.
It will prevent NPE but the statistics gathered between the instantiation and the initialization
will be lost anyway 😥. Because #init will clean internal state, and we need this to have the extension
functional with mvnd.

Fixes #199

372 of 430 relevant lines covered (86.51%)

0.87 hits per line

Source Files on job #284.1
  • Tree
  • List 25
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 284
  • 124b3507 on github
  • Prev Job for on master (##283.1)
  • Next Job for on master (##285.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