GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Deprecate `hasCauseReference(Throwable)` from `Throwable` assertions · Issue #3715 · assertj/assertj

Deprecate hasCauseReference(Throwable) from Throwable assertions #3715

New issue
Copy link
New issue
Copy link
Closed
🚫 Deprecation
Closed
Deprecate hasCauseReference(Throwable) from Throwable assertions#3715
🚫 Deprecation
Copy link
Assignees
joel-costigliola
Milestone
3.27.1

Description

@scordio
scordio
opened on Dec 26, 2024
Issue body actions

hasCauseReference() has been introduced in 3.13 (#1443) to support reference comparison.

However, 3.20 introduced cause(), which allows for more flexible assertions, including reference comparison.

Given that the following:

assertThat(exception).hasCauseReference(expected);

can be rewritten as:

assertThat(exception).cause().isSameAs(expected);

we should deprecate hasCauseReference() as it's too specific.

Activity

  1. scordio
    added this to the 3.27.1 milestone on Dec 26, 2024
  2. joel-costigliola
    self-assigned this
    on Dec 29, 2024
  3. joel-costigliola
    closed this as completedin d692186on Dec 29, 2024
  4. mat3e
    added a commit that references this issue on Jan 3, 2025

    Deprecate hasCauseReference(throwable) in favor of cause().isSameAs(t…

    This issue will close once commit d692186 is merged into the '3.x' branch.
    d692186
  5. knutwannheden
    added a commit that references this issue on May 21, 2025

    feat: Add Rewrite Recipe to replace AssertJ hasCauseReference with cause

    a618ad1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @joel-costigliola
    joel-costigliola

Labels

No labels
No labels

Type

🚫 Deprecation

Projects

No projects

    Milestone

    • 3.27.1

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.