[GitHub] cloudstack pull request: CID-1338387: paranoia null checking

2015-11-10 Thread DaanHoogland
Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155468243 @rafaelweingartner after randomly oredering and limiting output to 1 the next step is looping over all (1) results and retrieving all hosts one by one ignoring

[GitHub] cloudstack pull request: CID-1338387: paranoia null checking

2015-11-10 Thread DaanHoogland
Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155451132 @miguelaferreira @rafaelweingartner I totally agree with you that this can be dealt with better. I didn't want to give it a second thought as my intention is t

[GitHub] cloudstack pull request: CID-1338387: paranoia null checking

2015-11-10 Thread rafaelweingartner
Github user rafaelweingartner commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155415964 @DaanHoogland I agree with @miguelaferreira. I have looked that code. The select it runs is the following: select h.id from host h where h.stat

Re: [GitHub] cloudstack pull request: CID-1338387: paranoia null checking

2015-11-10 Thread Daan Hoogland
sure On Tue, Nov 10, 2015 at 1:47 PM, miguelaferreira wrote: > Github user miguelaferreira commented on the pull request: > > https://github.com/apache/cloudstack/pull/1056#issuecomment-155411442 > > That intention opens up an entire category of errors, null > dereferencing). In addition

[GitHub] cloudstack pull request: CID-1338387: paranoia null checking

2015-11-10 Thread miguelaferreira
Github user miguelaferreira commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155411442 That intention opens up an entire category of errors, null dereferencing). In addition forces defensive coding, just like what you introduce in this PR.

[GitHub] cloudstack pull request: CID-1338387: paranoia null checking

2015-11-10 Thread DaanHoogland
Github user DaanHoogland commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155410755 It was put in there explicitely (return null;) so i trusted the intention. a review of the architecture could be justified. --- If your project is set up for

[GitHub] cloudstack pull request: CID-1338387: paranoia null checking

2015-11-10 Thread miguelaferreira
Github user miguelaferreira commented on the pull request: https://github.com/apache/cloudstack/pull/1056#issuecomment-155409591 Wouldn't it be better to make sure `endPointSelector.selectHypervisorHost(...)` never returns null? --- If your project is set up for it, you can reply to

[GitHub] cloudstack pull request: CID-1338387: paranoia null checking

2015-11-10 Thread DaanHoogland
GitHub user DaanHoogland opened a pull request: https://github.com/apache/cloudstack/pull/1056 CID-1338387: paranoia null checking You can merge this pull request into a Git repository by running: $ git pull https://github.com/DaanHoogland/cloudstack CID-1338387 Alternatively