Skip to content

Commit

Permalink
fix(rabbitmq): NPE during properties deserialization (#689)
Browse files Browse the repository at this point in the history
  • Loading branch information
chillleader authored Jun 7, 2023
1 parent 2adb598 commit aac9c5b
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@

public class InboundConnectorContextImpl extends AbstractConnectorContext
implements InboundConnectorContext {

private final Logger LOG = LoggerFactory.getLogger(InboundConnectorContextImpl.class);
private static final Set<String> reservedKeys =
Set.of(
Expand Down Expand Up @@ -111,8 +112,10 @@ public InboundConnectorProperties getProperties() {

@Override
public <T> T getPropertiesAsType(Class<T> cls) {

Map<String, Object> result =
properties.getPropertiesAsObjectMap().entrySet().stream()
.filter(entry -> entry.getValue() != null)
.collect(
Collectors.toMap(
Map.Entry::getKey,
Expand All @@ -121,6 +124,7 @@ public <T> T getPropertiesAsType(Class<T> cls) {
? entry.getValue()
: FeelParserWrapper.parseIfIsFeelExpressionOrGetOriginal(
entry.getValue())));

return objectMapper.convertValue(result, cls);
}

Expand Down

0 comments on commit aac9c5b

Please sign in to comment.