Skip to content

Commit

Permalink
SAK-34030 Only have a single setter for RSF (sakaiproject#5428)
Browse files Browse the repository at this point in the history
When binding parameters from a request to a bean RSF isn’t predictable in which setter will get used, this results in the binding failing 50% of the time. By renaming one of the methods we force RSF to use the one we want all the time.
  • Loading branch information
buckett authored and ottenhoff committed Mar 23, 2018
1 parent d2fc729 commit 28b7a9c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ public ConfigEntry getConfig()
return config;
}

public void setOtherRecipients(List<String> otherRecipients)
// RSF Has a problem with overloaded setters so we force it to use the String one.
public void setOtherRecipientsList(List<String> otherRecipients)
{
this.otherRecipients = otherRecipients;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public void setOtherRecipientsList() {
otherRecipients.add("[email protected]");
otherRecipients.add("[email protected]");

entry.setOtherRecipients(otherRecipients);
entry.setOtherRecipientsList(otherRecipients);
assertFalse(entry.getOtherRecipients().isEmpty());
assertEquals(3, entry.getOtherRecipients().size());
assertEquals("[email protected]", entry.getOtherRecipients().get(0));
Expand Down

0 comments on commit 28b7a9c

Please sign in to comment.