Skip to content

Commit

Permalink
fix string comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
fmessmer committed Sep 15, 2018
1 parent d5a7eaa commit 4854154
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void detachListener(ActionClientListener target) {
*/
public ActionFuture<T_ACTION_GOAL, T_ACTION_FEEDBACK, T_ACTION_RESULT> sendGoal(T_ACTION_GOAL agMessage, String id) {
GoalID gid = getGoalId(agMessage);
if (id == "") {
if (id.equals("")) {
goalIdGenerator.generateID(gid);
} else {
gid.setId(id);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/github/rosjava_actionlib/ActionGoal.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,6 @@ public void setGoalMessage(Message gm) {
}

public boolean equalId(ActionGoal ag) {
return (this.getGoalId() == ag.getGoalId());
return (this.getGoalId().equals(ag.getGoalId()));
}
}

0 comments on commit 4854154

Please sign in to comment.