Skip to content

Conversation

@schlosna
Copy link
Contributor

@schlosna schlosna commented Apr 1, 2023

Before this PR

Closes #2543

What happened?

PR palantir/tritium#1688 is failing attempting to upgrade to gradle-baseline 5.2.0 with change #2530 on https://github.com/palantir/tritium/blob/13799047a8b715b4ebf395de80deed78a86b734c/tritium-registry/src/main/java/com/palantir/tritium/metrics/registry/TagMap.java#L120-L123

> Task :tritium-registry:compileJava FAILED
/home/circleci/project/tritium-registry/src/main/java/com/palantir/tritium/metrics/registry/TagMap.java:123: error: An unhandled exception was thrown by the Error Prone static analysis plugin.
            if (comparisonResult == 0) {
                                 ^
     Please report this at https://github.com/google/error-prone/issues/new and include the following:
  
     error-prone version: 2.18.0
     BugPattern: CardinalityEqualsZero
     Stack Trace:
     java.lang.IllegalStateException: Expected expression 'comparisonResult' to be a method invocation or field access, but was IDENTIFIER
  	at com.google.errorprone.util.ASTHelpers.getReceiver(ASTHelpers.java:605)
  	at com.palantir.baseline.errorprone.CardinalityEqualsZero.matchBinary(CardinalityEqualsZero.java:61)
  	at com.google.errorprone.scanner.ErrorProneScanner.processMatchers(ErrorProneScanner.java:449)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitBinary(ErrorProneScanner.java:512)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitBinary(ErrorProneScanner.java:150)

After this PR

==COMMIT_MSG==
Fix #2543 CardinalityEqualsZero equality comparison check
==COMMIT_MSG==

Possible downsides?

@schlosna schlosna requested review from carterkozak and mpritham April 1, 2023 02:58
@changelog-app
Copy link

changelog-app bot commented Apr 1, 2023

Generate changelog in changelog/@unreleased

Type

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

Description

Fix #2543 CardinalityEqualsZero equality comparison check

Check the box to generate changelog(s)

  • Generate changelog entry

Copy link
Contributor

@carterkozak carterkozak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@bulldozer-bot bulldozer-bot bot merged commit 63856ba into develop Apr 1, 2023
@bulldozer-bot bulldozer-bot bot deleted the ds/empty branch April 1, 2023 04:06
@svc-autorelease
Copy link
Collaborator

Released 5.3.0

This was referenced Apr 1, 2023
bulldozer-bot bot pushed a commit to palantir/witchcraft-api that referenced this pull request Apr 1, 2023
###### _excavator_ is a bot for automating changes across repositories.

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

# Release Notes
## 5.3.0
| Type | Description | Link |
| ---- | ----------- | ---- |
| Fix | Fix #2543 CardinalityEqualsZero equality comparison check | palantir/gradle-baseline#2544 |



To enable or disable this check, please contact the maintainers of Excavator.
This was referenced Apr 1, 2023
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.

CardinalityEqualsZero fails on equals

5 participants