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

jcgay / maven-profiler / #284
87%

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

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

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

372 of 430 relevant lines covered (86.51%)

0.87 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
89.25
-1.96% src/main/java/fr/jcgay/maven/profiler/ProfilerEventSpy.java
Jobs
ID Job ID Ran Files Coverage
1 #284.1 20 Apr 2025 06:02PM UTC 25
86.51
Source Files on build #284
  • Tree
  • List 25
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 124b3507 on github
  • Prev Build on master
  • Next Build on master
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