Skip to content

Commit

Permalink
eclipse-ditto#60: fixed persistence actor compile errors
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Jaeckle <thomas.jaeckle@bosch-si.com>
  • Loading branch information
thjaeckle committed Jan 17, 2018
1 parent bbe63ce commit ce4ffef
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<properties>
<!-- globally set version for checking binary compatibility against -->
<binary-compatibility-check.version>${project.version}</binary-compatibility-check.version>
<binary-compatibility-check.version>0.1.0-M3</binary-compatibility-check.version>

<scala.version>2.12</scala.version> <!-- for scala libraries the scala version is used in their artifactId -->
<scala.full.version>2.12.3</scala.full.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -410,25 +410,27 @@ private ThingPersistenceActor(final String thingId, final ActorRef pubSubMediato

// # Feature Definition Creation
.match(FeatureDefinitionCreated.class, fdc -> thing = thing.toBuilder()
.setFeature(fdc.getFeatureId(), thing.getFeatures()
.setFeature(thing.getFeatures()
.flatMap(features -> features.getFeature(fdc.getFeatureId()))
.map(feature -> feature.setDefinition(fdc.getDefinition()))
.orElseGet(() -> Feature.newBuilder()
.definition(fdc.getDefinition())
.withId(fdc.getFeatureId()))
.withId(fdc.getFeatureId())
.build())
)
.setRevision(getRevisionNumber())
.setModified(fdc.getTimestamp().orElse(null))
.build())

// # Feature Definition Modification
.match(FeatureDefinitionModified.class, fdm -> thing = thing.toBuilder()
.setFeature(fdm.getFeatureId(), thing.getFeatures()
.setFeature(thing.getFeatures()
.flatMap(features -> features.getFeature(fdm.getFeatureId()))
.map(feature -> feature.setDefinition(fdm.getDefinition()))
.orElseGet(() -> Feature.newBuilder()
.definition(fdm.getDefinition())
.withId(fdm.getFeatureId()))
.withId(fdm.getFeatureId())
.build())
)
.setRevision(getRevisionNumber())
.setModified(fdm.getTimestamp().orElse(null))
Expand Down

0 comments on commit ce4ffef

Please sign in to comment.