Skip to content

[FLINK-37788] Use Java 17 instanceof pattern matching in equals() method in Flink Core… #26552

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pranav234
Copy link

… types

What is the purpose of the change

Refractor equals() method in different classes to use Java 17 pattern matching capabilities of Java 17 instance of operator

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): No
  • The serializers: (yes / no / don't know) No
  • The runtime per-record code paths (performance sensitive): (yes / no / don't know) No
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (yes / no / don't know) No
  • The S3 file system connector: (yes / no / don't know) No

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented) not applicable

@flinkbot
Copy link
Collaborator

flinkbot commented May 13, 2025

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

@pranav234 pranav234 changed the title [FLINK-37788] Use Java 17 instanceof in equals() method in Flink Core… [FLINK-37788] Use Java 17 instanceof pattern matching in equals() method in Flink Core… May 13, 2025
@pranav234
Copy link
Author

@flinkbot run azure

@pranav234
Copy link
Author

ping @rmetzger @davidradl

@snuyanzin
Copy link
Contributor

I wonder how it will work with jdk11 which is still used for nightly

- template: build-nightly-dist.yml
parameters:
stage_name: cron_snapshot_deployment
environment: PROFILE="-Djdk11 -Pjava11-target"
container: flink-build-container
# In order for other repository's(e.g. flink-docker, flink-benchmarks) CI to cover all supported jdks, keep it to the minimum supported version.
# Upgrade this only when we drop support for this jdk version.
jdk: 11

@davidradl
Copy link
Contributor

the CI FAILURE looks like a a checkstyle issue.

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.

4 participants