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

Replace Guava classes #2215

Merged
merged 12 commits into from
Jun 14, 2023
Merged

Replace Guava classes #2215

merged 12 commits into from
Jun 14, 2023

Conversation

pks-1981
Copy link
Contributor

@pks-1981 pks-1981 commented Jun 11, 2023

Replace Guava classes
com.google.common.base.Preconditions.checkNotNull -> Objects.requireNonNull
com.google.common.base.Charsets.UTF_8 -> java.nio.charset.StandardCharsets.UTF_8
com.google.common.base.Objects -> java.util.Objects

References

#2111

Submitter checklist

  • The PR request is well described and justified, including the body and the references
  • The PR title represents the desired changelog entry
  • The repository's code style is followed (see the contributing guide)
  • Test coverage that demonstrates that the change works as expected
  • For new features, there's necessary documentation in this pull request or in a subsequent PR to wiremock.org

@pks-1981
Copy link
Contributor Author

@tomakehurst @timtebeek
Hello
Plz review it

@tomakehurst
Copy link
Member

I'm not keen on replacing firstNonNull with Optional from a performance perspective since the former doesn't create a redundant object.

In general also, I think the goal here isn't to eliminate Guava completely. If it's providing something useful that doesn't have a direct JDK equivalent then let's keep it.

@tomakehurst tomakehurst merged commit a02ea76 into wiremock:master Jun 14, 2023
7 checks passed
@pks-1981 pks-1981 deleted the utf8 branch June 14, 2023 14:29
@oleg-nenashev oleg-nenashev added the chore Maintenance label Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Maintenance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants