diff --git a/framework/base/src/base/org/ofbiz/base/util/UtilMisc.java b/framework/base/src/base/org/ofbiz/base/util/UtilMisc.java index d8fd6a8de2..9e78eaf7bb 100644 --- a/framework/base/src/base/org/ofbiz/base/util/UtilMisc.java +++ b/framework/base/src/base/org/ofbiz/base/util/UtilMisc.java @@ -350,6 +350,15 @@ public class UtilMisc { return list; } + public static void addToListInMap(Object element, Map theMap, Object listKey) { + List theList = (List) theMap.get(listKey); + if (theList == null) { + theList = FastList.newInstance(); + theMap.put(listKey, theList); + } + theList.add(element); + } + public static long toLong(Object value) { if (value != null) { if (value instanceof Long) {