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 Files management with STL (refs #2111) #2256

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

tomasbjerre
Copy link
Contributor

Removing imports on Guava Files and using Java standard library.

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

@tomasbjerre tomasbjerre requested a review from a team as a code owner July 10, 2023 15:13
@oleg-nenashev oleg-nenashev added the chore Maintenance label Jul 10, 2023
Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

Thanks! When you use Paths.get() please make sure to catch InvalidPathException in all usages Oracle was so kind to make it a runtime exception instead of IOException, and we had a bunch of bugs in Jenkins because of that

@tomasbjerre
Copy link
Contributor Author

Thanks! When you use Paths.get() please make sure to catch InvalidPathException in all usages Oracle was so kind to make it a runtime exception instead of IOException, and we had a bunch of bugs in Jenkins because of that

Good to know! When I looked at the individual changes here I cannot see that catching InvalidPathException would change any behavior.

In production code AbstractFileSource was throwing RuntimeException before and will do it now.

In test cases I usually just let it crash with whatever exception is thrown, it seems to me that this is the strategy here as well.

Copy link
Member

@oleg-nenashev oleg-nenashev left a comment

Choose a reason for hiding this comment

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

Well, you're totally right. Current handling is not what I would expect, but indeed the change does not alter the behavior. Let's merge it, and thanks!

@oleg-nenashev oleg-nenashev changed the title chore: replacing Guava Files with STL (refs #2111) Replace Guava Files management with STL (refs #2111) Jul 12, 2023
@oleg-nenashev oleg-nenashev merged commit c94b2a2 into wiremock:master Jul 12, 2023
7 checks passed
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

2 participants