Skip to content

GH-3844: Using JEP 394: Pattern Matching for instanceof for #equals in Node and Triple implementations#3846

Merged
arne-bdt merged 1 commit intoapache:mainfrom
arne-bdt:GH-3844-Using-JEP-394
Apr 9, 2026
Merged

GH-3844: Using JEP 394: Pattern Matching for instanceof for #equals in Node and Triple implementations#3846
arne-bdt merged 1 commit intoapache:mainfrom
arne-bdt:GH-3844-Using-JEP-394

Conversation

@arne-bdt
Copy link
Copy Markdown
Contributor

@arne-bdt arne-bdt commented Apr 8, 2026

GitHub issue resolved #3844

Pull request Description:

  • Using JEP 394: Pattern Matching for instanceof for #equals in Node and Triple implementations

  • Commits have been squashed to remove intermediate development commit messages.
  • Key commit messages start with the issue number (GH-xxxx)

By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the Contributor's Agreement.


See the Apache Jena "Contributing" guide.

…uals in Node and Triple implementations

- Using JEP 394: Pattern Matching for instanceof for #equals in Node and Triple implementations
@afs
Copy link
Copy Markdown
Member

afs commented Apr 9, 2026

FWIW The semantics changed; probably doesn't matter.

instanceof takes account of subclasses, getClass() != obj.getClass() does not.

We could make the main RDF term / Node classes final (not this PR!).

@arne-bdt arne-bdt merged commit 6906cbf into apache:main Apr 9, 2026
@arne-bdt
Copy link
Copy Markdown
Contributor Author

arne-bdt commented Apr 9, 2026

@afs Should I have waited for a second approval?

@afs
Copy link
Copy Markdown
Member

afs commented Apr 9, 2026

No. Like all open source, resource is limited.

If we were to wait, for a fixed number of approvals, we'd have a long backlog which causes its own problems and costs.

We are also async - merging is where sync happens.

In short - use your judgement.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Using JEP 394: Pattern Matching for instanceof for #equals in Node and Triple implementations

3 participants