cancel
Showing results for 
Search instead for 
Did you mean: 

FormService.SubmitFormData should accept null

pereira_melvin
Champ in-the-making
Champ in-the-making
It would be good if FormService.SubmitFormData and SubmitTaskData can accept null as a parameter to the Map<String, String>.
Reason:
   If I have a cdi scoped bean filled up from a jsf form. I just need a trigger to put the waiting task to move forward.
under these circumstances one has to really create an Instance of Map and send it empty thereby consuming unnecessary memory.
But if the Submit methods of FormService can check for the existence of null it can just ignore and trigger the task to move forward.

I may be wrong but I have to do this time and again.
3 REPLIES 3

ronald_van_kuij
Champ on-the-rise
Champ on-the-rise
I agree it could be a convenience, but are you seriously concerned about this map using memory?

frederikherema1
Star Contributor
Star Contributor
Seriously?

Use Collections.EMPTY_MAP -> this is already consuming memory… Or create your own map-implementing singleton that consumes even LESS memory Smiley Happy

pereira_melvin
Champ in-the-making
Champ in-the-making
But it does not harm checking for an existence of a null value , since many a time we may not be interested in sending those
string data types in the Map, when we already have facilities from activiti like spring beans and cdi beans.