Minor code cleanup
This commit is contained in:
		
							parent
							
								
									e3c823ef37
								
							
						
					
					
						commit
						abee0ea2d9
					
				@ -95,12 +95,10 @@ public class DeviceActorMessageProcessor extends AbstractContextAwareMsgProcesso
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private void refreshAttributes(DeviceAttributesEventNotificationMsg msg) {
 | 
			
		||||
        if (this.deviceAttributes != null) {
 | 
			
		||||
            if (msg.isDeleted()) {
 | 
			
		||||
                msg.getDeletedKeys().forEach(key -> deviceAttributes.remove(key));
 | 
			
		||||
            } else {
 | 
			
		||||
                deviceAttributes.update(msg.getScope(), msg.getValues());
 | 
			
		||||
            }
 | 
			
		||||
        if (msg.isDeleted()) {
 | 
			
		||||
            msg.getDeletedKeys().forEach(key -> deviceAttributes.remove(key));
 | 
			
		||||
        } else {
 | 
			
		||||
            deviceAttributes.update(msg.getScope(), msg.getValues());
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -206,7 +204,6 @@ public class DeviceActorMessageProcessor extends AbstractContextAwareMsgProcesso
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    void processAttributesUpdate(ActorContext context, DeviceAttributesEventNotificationMsg msg) {
 | 
			
		||||
        //TODO: improve this procedure to fetch only changed attributes and support attributes deletion
 | 
			
		||||
        refreshAttributes(msg);
 | 
			
		||||
        Set<AttributeKey> keys = msg.getDeletedKeys();
 | 
			
		||||
        if (attributeSubscriptions.size() > 0) {
 | 
			
		||||
 | 
			
		||||
@ -22,10 +22,6 @@ import com.google.common.util.concurrent.AbstractFuture;
 | 
			
		||||
 */
 | 
			
		||||
public class SimpleListenableFuture<V> extends AbstractFuture<V> {
 | 
			
		||||
 | 
			
		||||
    public SimpleListenableFuture() {
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public boolean set(V value) {
 | 
			
		||||
        return super.set(value);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user