Skip to content

Commit

Permalink
[JENKINS-29942] Fixed problems pointed by findbugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ikedam committed Nov 26, 2015
1 parent 652cf12 commit 1777c06
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
Expand Up @@ -42,13 +42,8 @@ public class ChoiceWatchRunListener extends RunListener<AbstractBuild<?,?>>
@Override
public void onFinalized(AbstractBuild<?,?> build)
{
Object p = build.getProject();
AbstractProject<?,?> job = build.getProject();

if(!(p instanceof AbstractProject<?,?>))
{
return;
}
AbstractProject<?,?> job = (AbstractProject<?,?>)p;
ParametersDefinitionProperty pp = job.getProperty(ParametersDefinitionProperty.class);
if(pp == null)
{
Expand Down
Expand Up @@ -259,6 +259,13 @@ public boolean equals(Object o){
return true;
}

@Override
public int hashCode() {
int r = (name != null)?name.hashCode():0;
r = r * 31 + ((choiceList != null)?choiceList.hashCode():0);
return r;
}

/**
* @return
* @see java.lang.Object#toString()
Expand Down

0 comments on commit 1777c06

Please sign in to comment.