gradle / gradle/develocity-build-validation-scripts

`NullPointerException` when ran with `-P`

Open
#843 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Shell
Stars
115
Forks
23
Avg merge
1d 4h
Merged PRs (30d)
6

Description

It was reported that, given this invocation, script n. 1 failed with an exception. I don't have a reproducer at this time.

```bash
./01-validate-local-build-caching-same-location.sh -r file:///home/example/repo -b example-branch -g install -a -P\ lorem\,ipsum\,foo\,bar
```

```
[ERROR] Error executing a DevelocityListener callback
java.lang.NullPointerException: Cannot invoke "java.util.Collection.size()" because "c" is null
at java.util.LinkedHashSet. (LinkedHashSet.java:181)
at com.gradle.RootProjectExtractor.discoverAllProjects (RootProjectExtractor.java:61)
at com.gradle.RootProjectExtractor.extractRootProject (RootProjectExtractor.java:31)
at com.gradle.ConfigureDevelocityAdaptor.configure (ConfigureDevelocityAdaptor.java:48)
at com.gradle.ConfigureDevelocityListener.configure (ConfigureDevelocityListener.java:21)
at com.gradle.maven.internal.DevelocityLifecycleManager.a (SourceFile:400)
at java.lang.Iterable.forEach (Iterable.java:75)
at java.util.Collections$UnmodifiableCollection.forEach (Collections.java:1116)
at com.gradle.maven.internal.DevelocityLifecycleManager.b (SourceFile:398)
at com.gradle.maven.internal.DevelocityLifecycleManager.c (SourceFile:370)
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept (ForEachOps.java:184)
at java.util.stream.ReferencePipeline$15$1.accept (ReferencePipeline.java:541)
at java.util.stream.IntPipeline$1$1.accept (IntPipeline.java:180)
at java.util.stream.Streams$RangeIntSpliterator.forEachRemaining (Streams.java:104)
at java.util.Spliterator$OfInt.forEachRemaining (Spliterator.java:712)
at java.util.stream.AbstractPipeline.copyInto (AbstractPipeline.java:509)
at java.util.stream.AbstractPipeline.wrapAndCopyInto (AbstractPipeline.java:499)
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential (ForEachOps.java:151)
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential (ForEachOps.java:174)
at java.util.stream.AbstractPipeline.evaluate (AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.forEach (ReferencePipeline.java:596)
at com.gradle.maven.internal.DevelocityLifecycleManager.a (SourceFile:370)
at com.gradle.maven.internal.DevelocityLifecycleManager.onEvent (SourceFile:313)
at org.apache.maven.eventspy.internal.EventSpyDispatcher.onEvent (EventSpyDispatcher.java:86)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:908)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:283)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:206)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:103)
at java.lang.reflect.Method.invoke (Method.java:580)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:283)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:226)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:407)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:348)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with 01-validate-local-build-caching-same-location.sh and the reported invocation using -P, then inspect RootProjectExtractor.discoverAllProjects at the stack-trace location. A reproducer is not provided, so first establish the failure and its input conditions. Done means the invocation no longer raises the reported NullPointerException.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, shell
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.