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

Inverse equality in DeploymentInfo #10

Open
marcingrzejszczak opened this issue Jul 1, 2016 · 1 comment
Open

Inverse equality in DeploymentInfo #10

marcingrzejszczak opened this issue Jul 1, 2016 · 1 comment

Comments

@marcingrzejszczak
Copy link

In https://github.com/hpcloud/cloudfoundry-jenkins/blob/master/src/main/java/com/hpe/cloudfoundryjenkins/DeploymentInfo.java your checking for equality to "" like this:

 this.command = jenkinsConfig.command;
        if (command.equals("")) {
            command = null;
        }

You should inverse the check like this

 this.command = jenkinsConfig.command;
        if ("".equals(command)) {
            command = null;
        }

Cause otherwise you will cause NPEs (which I'm getting)

@marcingrzejszczak
Copy link
Author

Also in other places you should consider that the XML doesn't contain for instance appURIs. If one is generating jobs from the code he is forced to set every single value. Maybe it would be nice to assume that XML entries can be null ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant