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

Deprecate SocketAddress-related methods #1188

Merged
merged 1 commit into from
Sep 7, 2023
Merged

Conversation

jyemin
Copy link
Contributor

@jyemin jyemin commented Sep 6, 2023

  • ServerAddress#getSocketAddress
  • ServerAddress#getSocketAddresses
  • UnixServerAddress#getUnixSocketAddress

JAVA-4940

When we actually remove these methods and replace with some private helper, and also remove StreamFactory from API, we'll be able to remove the ServerAddressWithResolver class and just pass the InetAddressResolver wherever it needs to be available.

* ServerAddress#getSocketAddress
* ServerAddress#getSocketAddresses
* UnixServerAddress#getUnixSocketAddress

JAVA-4940
@jyemin jyemin self-assigned this Sep 6, 2023
*/
@Deprecated
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This one seems similar enough to also deprecate at the same time

@@ -44,14 +44,18 @@ public UnixServerAddress(final String path) {
isTrueArgument("The path must end in .sock", path.endsWith(".sock"));
}

@SuppressWarnings("deprecation")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not sure why the warning also has to be suppressed here, but it complains if I don't

Copy link
Member

Choose a reason for hiding this comment

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

It's probably because of the -Xlint:deprecation lint: the method overrides a deprecated method.

@jyemin jyemin merged commit 481e793 into mongodb:master Sep 7, 2023
56 checks passed
@jyemin jyemin deleted the j4940 branch September 7, 2023 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants