[GRADLE-2969] Unobvious NPE thrown when using null as a dependency notation Created: 28/Nov/13 Updated: 28/Nov/13 Resolved: 28/Nov/13 |
|
| Status: | Resolved |
| Project: | Gradle |
| Affects Version/s: | None |
| Fix Version/s: | 1.11-rc-1 |
| Type: | Bug | ||
| Reporter: | Gradle Forums | Assignee: | Luke Daley |
| Resolution: | Fixed | Votes: | 0 |
| Known Issue Of: |
| Description |
dependencies {
compile null
}
Produces an infrastructure level NPE. This can happen in the real world when notations come from a central map as is common practice. |
| Comments |
| Comment by Gradle Forums [ 28/Nov/13 ] |
|
I don't quite follow what happened. Can you expand a little bit please, perhaps with some examples. |
| Comment by Gradle Forums [ 28/Nov/13 ] |
|
This is easy to reproduce. I have a multiproject, and I define all libraries we are depending on in a separate file that looks like this: ext.libraries = [ Now, a subproject got a new dependency on jms_api; so in the build file for this subproject I declared: dependencies { Please notice the typo "jsm_api" instead of "jms_api"! This caused the reported NPE. So, my expectation is: Gradle sees the invalid symbolic name and reports it as invalid instead of running into the reported NPE. |