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

[JavaRequirement#satisfies_version] java_version_s: Fix Regular Expression #5405

Conversation

RandomDSdevel
Copy link
Contributor

@RandomDSdevel RandomDSdevel commented Dec 14, 2018

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same change?
  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes? Here's an example. (No, but I don't think there's anything I've changed here that the existing test or tests for the code involved already cover. Please correct me if I'm wrong on this.)
  • Have you successfully run brew style with your changes locally?
  • Have you successfully run brew tests with your changes locally? (All tests pass locally except 'test/os/mac_spec.rb,' which fails with an unrelated error stating that, "Locale::parse' failed to parse 'OS::Mac::language.")

     Address the second-to-last part of #5280 (comment) per this PR's only commit's message.

…xpression.

     The match obtained by applying the regular expression used to index into
the `stderr` member of the result of calling `system_command` in the relevant
variable assignment could yield unexpected results.  The regular expression in-
volved was not strict enough and contained an unescaped period, which could
match any character, not just the expected literal decimal point.  This commit
corrects this oversight by escaping the relevant character, thus addressing
@apjanke's remark in Homebrew#5280 (comment) on the existence of a:

> …possible bug - that `.` looks like it should be escaped as `\.` to match a
> literal ".".) …
@MikeMcQuaid MikeMcQuaid merged commit be02faf into Homebrew:master Dec 15, 2018
@MikeMcQuaid
Copy link
Member

Thanks again @RandomDSdevel, nice work!

@RandomDSdevel RandomDSdevel deleted the fix-possible-JavaRequirement-version-parsing-bug branch December 15, 2018 19:57
@RandomDSdevel
Copy link
Contributor Author

     You're welcome, @MikeMcQuaid!

@lock lock bot added the outdated PR was locked due to age label Jan 14, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated PR was locked due to age
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants