-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
a split on string can give empty elements - fix bz1421572 #12944
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Is there a test we can add to cover this case?
[test] |
Evaluated for origin test up to 6ea8ae8 |
@knobunc A unit test case will not be useful, the error is at F5 REST api (empty condition is not ignored). |
@rajatchopra got it. Thanks |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_future/179/) (Base Commit: bd3e362) |
[merge] |
Evaluated for origin merge up to 6ea8ae8 |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_future/211/) (Base Commit: 2d3b39c) (Image: devenv-rhel7_5915) |
Fix for: https://bugzilla.redhat.com/show_bug.cgi?id=1421572
A strings.split("/") gives two elements, both empty. And we would barf without this fix. Also for any path that ends with a "/" will give an empty last element.
cc @knobunc @openshift/networking