teragrep / cfe_31

0 stars 0 forks source link

Move send method from TargetEnum to StorageFlow #24

Closed MoonBow-1 closed 6 months ago

MoonBow-1 commented 7 months ago

Description

TargetEnum shouldn't create a StorageFlow inside the send method and call the StorageFlow's send method after it.

MoonBow-1 commented 6 months ago

Changed from:

final int storageID = target.send(this.flow, token);

to:

final StorageFlow storageFlow = new StorageFlow(
    target.type,
    this.flow,
    target.name
);

final int storageID = storageFlow.send(token);

The send method is now removed from TargetEnum

MoonBow-1 commented 6 months ago

Changes approved