Skip to content
Snippets Groups Projects
Commit a9d3788e authored by srosse's avatar srosse
Browse files

OO-2048: fix autoboxing of boolean value which can be null

parent aaff1b21
No related branches found
No related tags found
No related merge requests found
...@@ -77,7 +77,8 @@ public class DropboxForm extends FormBasicController { ...@@ -77,7 +77,8 @@ public class DropboxForm extends FormBasicController {
protected void formOK(UserRequest ureq) { protected void formOK(UserRequest ureq) {
fireEvent (ureq, Event.DONE_EVENT); fireEvent (ureq, Event.DONE_EVENT);
} }
@Override
protected void formInnerEvent (UserRequest ureq, FormItem source, FormEvent event) { protected void formInnerEvent (UserRequest ureq, FormItem source, FormEvent event) {
if (source == enablemail) { if (source == enablemail) {
confirmation.setMandatory (enablemail.isSelected(0)); confirmation.setMandatory (enablemail.isSelected(0));
...@@ -112,7 +113,9 @@ public class DropboxForm extends FormBasicController { ...@@ -112,7 +113,9 @@ public class DropboxForm extends FormBasicController {
confirmation = uifactory.addTextAreaElement("confirmation", "form.dropbox.confirmation", 2500, 4, 40, true, sConfirmation != null ? sConfirmation : "", formLayout); confirmation = uifactory.addTextAreaElement("confirmation", "form.dropbox.confirmation", 2500, 4, 40, true, sConfirmation != null ? sConfirmation : "", formLayout);
Boolean enableMail = (Boolean)config.get(TACourseNode.CONF_DROPBOX_ENABLEMAIL); Boolean enableMail = (Boolean)config.get(TACourseNode.CONF_DROPBOX_ENABLEMAIL);
confirmation.setMandatory(enableMail); if(enableMail != null) {
confirmation.setMandatory(enableMail.booleanValue());
}
enablemail = uifactory.addCheckboxesHorizontal("enablemail", "form.dropbox.enablemail", formLayout, new String[]{"xx"}, new String[]{null}); enablemail = uifactory.addCheckboxesHorizontal("enablemail", "form.dropbox.enablemail", formLayout, new String[]{"xx"}, new String[]{null});
enablemail.select("xx", enableMail != null ? enableMail.booleanValue() : true); enablemail.select("xx", enableMail != null ? enableMail.booleanValue() : true);
enablemail.addActionListener(FormEvent.ONCLICK); enablemail.addActionListener(FormEvent.ONCLICK);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment