Skip to content

Commit

Permalink
andle missing fields in DefaultMessageBuilder and ensure that one fie…
Browse files Browse the repository at this point in the history
…ld is not serialized in DefaultEventBuilder
  • Loading branch information
d4nielyan9 committed Jan 27, 2025
1 parent c3391a0 commit 24a21b6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ public static class InternalEventImplementation implements InternalEvent {
private final boolean notificationsEnabled;

private final CaseInsensitiveHashMap<String, TypedValue<?>> variables;
private final CaseInsensitiveHashMap<String, TypedValue<?>> parameters;
private transient final CaseInsensitiveHashMap<String, TypedValue<?>> parameters;
private final CaseInsensitiveHashMap<String, String> loggingVariables;

private final String legacyCorrelationId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import org.mule.runtime.api.metadata.MapDataType;
import org.mule.runtime.api.metadata.MediaType;
import org.mule.runtime.api.metadata.TypedValue;
import org.mule.runtime.api.util.CaseInsensitiveMapWrapper;
import org.mule.runtime.core.api.message.ExceptionPayload;
import org.mule.runtime.core.internal.message.InternalMessage.CollectionBuilder;
import org.mule.runtime.core.privileged.metadata.DefaultCollectionDataType;
Expand All @@ -35,8 +36,10 @@
import java.io.Serializable;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;

import jakarta.activation.DataHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

Expand All @@ -49,6 +52,11 @@ public final class DefaultMessageBuilder
private TypedValue payload = of(NULL_TYPED_VALUE);
private TypedValue attributes = of(NULL_TYPED_VALUE);

private final Map<String, TypedValue<Serializable>> inboundProperties = new CaseInsensitiveMapWrapper<>();
private final Map<String, TypedValue<Serializable>> outboundProperties = new CaseInsensitiveMapWrapper<>();
private Map<String, DataHandler> inboundAttachments = new LinkedHashMap<>();
private Map<String, DataHandler> outboundAttachments = new LinkedHashMap<>();

public DefaultMessageBuilder() {}

public DefaultMessageBuilder(org.mule.runtime.api.message.Message message) {
Expand Down

0 comments on commit 24a21b6

Please sign in to comment.