PL-10641 UnsupportedOperationException during serialization of UnmodifiableMap

This commit is contained in:
Yuriy Artamonov 2018-04-03 22:45:10 +04:00
parent 5b5224df56
commit 40d63fdb56
2 changed files with 3 additions and 3 deletions

View File

@ -57,8 +57,7 @@ public class ExceptionReportServiceBean implements ExceptionReportService {
@Override
public void sendExceptionReport(String supportEmail, Map<String, Object> binding) {
try {
Map<String, Object> map = new HashMap<>();
map.putAll(binding);
Map<String, Object> map = new HashMap<>(binding);
map.put("toHtml", new MethodClosure(HtmlUtils.class, "convertToHtml"));
String body = getExceptionReportBody(map);

View File

@ -17,6 +17,7 @@
package com.haulmont.cuba.desktop.sys;
import com.google.common.collect.ImmutableMap;
import com.haulmont.cuba.client.ClientConfig;
import com.haulmont.cuba.core.app.ExceptionReportService;
import com.haulmont.cuba.core.global.*;
@ -129,7 +130,7 @@ public class JXErrorPaneExt extends JXErrorPane {
binding.putAll(additionalExceptionReportBinding);
}
reportService.sendExceptionReport(clientConfig.getSupportEmail(), MapUtils.unmodifiableMap(binding));
reportService.sendExceptionReport(clientConfig.getSupportEmail(), ImmutableMap.copyOf(binding));
mainFrame.showNotification(messages.getMainMessage("errorPane.emailSent", locale),
Frame.NotificationType.TRAY);