Skip to content

Commit

Permalink
Fix misplaced bracket
Browse files Browse the repository at this point in the history
Signed-off-by: Klem Yannic (INST/ECS1) <yannic.klem@bosch-si.com>
  • Loading branch information
Yannic92 committed Aug 22, 2019
1 parent f1298ec commit d8719cb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Expand Up @@ -170,11 +170,12 @@ private <T> Flow<Map<ThingId, T>, Map<ThingId, T>, NotUsed> filterMapKeysByBlock
return Flow.<Map<ThingId, T>>create()
.flatMapConcat(map ->
Source.fromIterator(map.entrySet()::iterator)
.via(blockNamespaceFlow(entry -> entry.getKey().getNamespace())))
.via(blockNamespaceFlow(entry -> entry.getKey().getNamespace()))
.fold(new HashMap<>(), (accumulator, entry) -> {
accumulator.put(entry.getKey(), entry.getValue());
return accumulator;
});
})
);
}

private <T> Flow<T, T, NotUsed> blockNamespaceFlow(final Function<T, String> namespaceExtractor) {
Expand Down
Expand Up @@ -139,7 +139,7 @@ private void processPolicyReferenceTag(final PolicyReferenceTag policyReferenceT
private void processThingEvent(final ThingEvent<?> thingEvent) {
LogUtil.enhanceLogWithCorrelationId(log, thingEvent);
log.debug("Forwarding incoming ThingEvent for thingId '{}'", String.valueOf(thingEvent.getThingEntityId()));
forwardEventToShardRegion(thingEvent, ThingEvent::getEntityId);
forwardEventToShardRegion(thingEvent, ThingEvent::getThingEntityId);
}

private <J extends Jsonifiable<?>> void forwardJsonifiableToShardRegion(final J message,
Expand Down
Expand Up @@ -17,10 +17,10 @@
import org.eclipse.ditto.json.JsonFactory;
import org.eclipse.ditto.json.JsonFieldDefinition;
import org.eclipse.ditto.json.JsonObject;
import org.eclipse.ditto.model.base.entity.id.EntityId;
import org.eclipse.ditto.model.base.headers.DittoHeaders;
import org.eclipse.ditto.model.base.json.FieldType;
import org.eclipse.ditto.model.base.json.JsonSchemaVersion;
import org.eclipse.ditto.model.things.ThingId;
import org.eclipse.ditto.model.things.WithThingId;
import org.eclipse.ditto.signals.events.base.Event;

Expand All @@ -42,7 +42,7 @@ public interface ThingEvent<T extends ThingEvent> extends Event<T>, WithThingId
String RESOURCE_TYPE = "thing";

@Override
default EntityId getEntityId() {
default ThingId getEntityId() {
return getThingEntityId();
}

Expand Down

0 comments on commit d8719cb

Please sign in to comment.