<p>Regarding <a href="https://bisq.slack.com/archives/C8MU98VSL/p1525179418000275" rel="nofollow">https://bisq.slack.com/archives/C8MU98VSL/p1525179418000275</a></p>
<p>I usually follow the strategy to do the normal use case first and handle exceptional cases in the else clauses. I also try to avoid returns during the code path as it can become harder to understand where the method breaks.</p>
<p>I know some are preferring the other style to do the validation first and break with return statements and sometimes I used that as well. Not super strongly opinion about that but as I used the first style in most of the code I tried to stick with that.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq-core/pull/106#issuecomment-385675054">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AkpZtpltlYZG6fM3sPyetRxRZuHAkiyaks5tuGgagaJpZM4Ttiqr">mute the thread</a>.<img src="https://github.com/notifications/beacon/AkpZtp32NJT_-ub8ygtRfZ-h0dGxGbQaks5tuGgagaJpZM4Ttiqr.gif" height="1" width="1" alt="" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/bisq-network/bisq-core/pull/106#issuecomment-385675054"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/bisq-network/bisq-core","title":"bisq-network/bisq-core","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/bisq-network/bisq-core"}},"updates":{"snippets":[{"icon":"PERSON","message":"@ManfredKarrer in #106: Regarding https://bisq.slack.com/archives/C8MU98VSL/p1525179418000275\r\n\r\nI usually follow the strategy to do the normal use case first and handle exceptional cases in the else clauses. I also try to avoid returns during the code path as it can become harder to understand where the method breaks.\r\n\r\nI know some are preferring the other style to do the validation first and break with return statements and sometimes I used that as well. Not super strongly opinion about that but as I used the first style in most of the code I tried to stick with that.   "}],"action":{"name":"View Pull Request","url":"https://github.com/bisq-network/bisq-core/pull/106#issuecomment-385675054"}}}</script>