brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nakomis <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Regex replacement dsl
Date Mon, 12 Oct 2015 13:15:57 GMT
Github user nakomis commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/910#discussion_r41754591
  
    --- Diff: core/src/main/java/org/apache/brooklyn/enricher/stock/AbstractTransformer.java
---
    @@ -57,14 +57,16 @@ public AbstractTransformer() {
         public void setEntity(EntityLocal entity) {
             super.setEntity(entity);
     
    -        Function<SensorEvent<T>, U> transformation = getTransformation();
             this.producer = getConfig(PRODUCER) == null ? entity: getConfig(PRODUCER);
             this.sourceSensor = (Sensor<T>) getRequiredConfig(SOURCE_SENSOR);
             Sensor<?> targetSensorSpecified = getConfig(TARGET_SENSOR);
             this.targetSensor = targetSensorSpecified!=null ? (Sensor<U>) targetSensorSpecified
: (Sensor<U>) this.sourceSensor;
             if (producer.equals(entity) && targetSensorSpecified==null) {
    +            // We cannot call getTransformation() here to log the tranformation, as it
will attempt
    +            // to resolve the transformation, which will cause the entity initialization
thread to
    +            // block
                 LOG.error("Refusing to add an enricher which reads and publishes on the same
sensor: "+
    --- End diff --
    
    As stated in the comment, we can't call getTransformation() here as the entity is being
initialized, so the call will block


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message