Skip to content

Commit

Permalink
Bad attempt to compute absolute value of signed 32-bit hashcode in au…
Browse files Browse the repository at this point in the history
….com.centrumsystems.hudson.plugin.buildpipeline.ProjectForm.getId()
  • Loading branch information
shlomomdahan committed Nov 6, 2024
1 parent dbbcc7d commit 8fedd28
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,11 @@ public List<Integer> getDependencyIds() {
*/
@JavaScriptMethod
public String asJSON() {
return BuildJSONBuilder.asJSON(context, pipelineBuild, getId(), getProjectId(), getDependencyIds(), getParameterList());
return BuildJSONBuilder.asJSON(context, pipelineBuild, id, projectId, getDependencyIds(), getParameterList());
}

public int getId() {
return Math.abs(id);
return id;
}

/**
Expand Down Expand Up @@ -171,7 +171,7 @@ public ArrayList<String> getParameterList() {
}

public Integer getProjectId() {
return Math.abs(projectId);
return projectId;
}

public AbstractBuild<?, ?> getCurrentBuild() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ public boolean equals(final Object obj) {
}

public int getId() {
return Math.abs(name.hashCode());
return name.hashCode();
}

/**
Expand Down

0 comments on commit 8fedd28

Please sign in to comment.