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

Fixed doesStreamExists throwing Exception even when stream does not exists #30

Merged
merged 2 commits into from Jul 3, 2014

Conversation

sylvaindeyris
Copy link

Previously proposed fix resolved the issue where doesStreamExists will return true in case the command failed but introduced a regression, causing an Exception to be thrown even when the stream does not exists.

Now the exception thrown by the command will be caught and the command output checked to verify either if the stream does not exists or if another error occured, rethrowing the exception in the second case.

@cloudbees-pull-request-builder

plugins » clearcase-plugin #74 SUCCESS
This pull request looks good

@Vlatombe
Copy link
Member

Vlatombe commented Jul 3, 2014

I guess you refer to PR #29.

String cleartoolResult = baos.toString();
return !(cleartoolResult.contains("stream not found"));
if (!(cleartoolResult.contains("stream not found"))) {
Copy link
Member

Choose a reason for hiding this comment

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

I think the intent would be clearer if the condition was inverted.

@cloudbees-pull-request-builder

plugins » clearcase-plugin #75 SUCCESS
This pull request looks good

Vlatombe added a commit that referenced this pull request Jul 3, 2014
Fixed doesStreamExists throwing Exception even when stream does not exists
@Vlatombe Vlatombe merged commit 478c7bb into jenkinsci:master Jul 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants