Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-add null check for exclude rule #1883

Merged
merged 2 commits into from
Aug 18, 2021
Merged

Re-add null check for exclude rule #1883

merged 2 commits into from
Aug 18, 2021

Conversation

fawind
Copy link
Contributor

@fawind fawind commented Aug 18, 2021

Before this PR

We removed this null-check in #1875 because intellij flags this as

Condition 'rule.getGroup() != null' is always 'true'.
Method 'getGroup' inherits annotation from package org.gradle.api.artifacts, thus 'non-null'.

However this does not seem to be true and an internal library failed to upgrade because rule.getGroup() returns null.

Stacktrace:

org.gradle.api.internal.tasks.TaskDependencyResolveException: Could not determine the dependencies of task ':checkUnusedDependenciesTest'.
Caused by: java.lang.NullPointerException: null value in entry: group=null
	at com.google.common.collect.CollectPreconditions.checkEntryNotNull(CollectPreconditions.java:32)
	at com.google.common.collect.ImmutableMap.entryOf(ImmutableMap.java:172)
	at com.google.common.collect.ImmutableMap$Builder.put(ImmutableMap.java:282)
	at com.palantir.baseline.plugins.BaselineExactDependencies.excludeRuleAsMap(BaselineExactDependencies.java:235)
	at com.palantir.baseline.plugins.BaselineExactDependencies.lambda$configureSourceSet$7(BaselineExactDependencies.java:173)
	at com.palantir.baseline.plugins.BaselineExactDependencies.lambda$configureSourceSet$8(BaselineExactDependencies.java:173)
	at org.gradle.internal.ImmutableActionSet$SetWithFewActions.execute(ImmutableActionSet.java:285)
       [...]

After this PR

==COMMIT_MSG==
Re-add null check for exclude rule
==COMMIT_MSG==

@changelog-app
Copy link

changelog-app bot commented Aug 18, 2021

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Re-add null check for exclude rule

Check the box to generate changelog(s)

  • Generate changelog entry

@bulldozer-bot bulldozer-bot bot merged commit 5fb72f3 into develop Aug 18, 2021
@bulldozer-bot bulldozer-bot bot deleted the fw/fix-null branch August 18, 2021 10:55
@svc-autorelease
Copy link
Collaborator

Released 4.19.0

bulldozer-bot bot pushed a commit to palantir/witchcraft-api that referenced this pull request Aug 18, 2021
###### _excavator_ is a bot for automating changes across repositories.

Changes produced by the roomba/latest-baseline-oss check.

# Release Notes
## 4.19.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Fix | Re-add null check for exclude rule | palantir/gradle-baseline#1883 |


## 4.20.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Fix | Fix missing setProperty error when using Gradle 6 | palantir/gradle-baseline#1884 |



To enable or disable this check, please contact the maintainers of Excavator.
This was referenced Aug 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants