cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaanHoogland <>
Subject [GitHub] cloudstack pull request: findbugs UC useless condition
Date Fri, 19 Jun 2015 12:47:38 GMT
Github user DaanHoogland commented on a diff in the pull request:
    --- Diff: engine/orchestration/src/com/cloud/agent/manager/ ---
    @@ -391,6 +391,32 @@ private static void tagCommand(Command cmd) {
    +    /**
    +     * @param commands
    +     * @return
    +     */
    +    private Command[] checkForCommandsAndTag(Commands commands) {
    +        Command[] cmds = commands.toCommands();
    +        assert cmds.length > 0 : "Ask yourself this about a hundred times.  Why am
I  sending zero length commands?";
    --- End diff --
    it was done like this in two places by Alena. I had the idea she had a goal in mind. the
assert is only nice in debug situation so her goal was probably educating developers. the
following if negates it, kind of completely.
    @bhaisaab it is also a test of the new findbugs messages that i am leaving it in for.
Shall we?

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message