teragrep / cfe_31

0 stars 0 forks source link

Make RelpPromise a field inside of CFE01Promise #25

Open MoonBow-1 opened 9 months ago

MoonBow-1 commented 9 months ago

Description

So instead of extending the RelpPromise, there should be a field for that purpose

MoonBow-1 commented 9 months ago

Since the extension is now removed, the RelpPromise List cannot contain CFE01Promises, handling the CFE01Promises is currently an issue for me.

MoonBow-1 commented 8 months ago

Currently the logic for adding Promises to the List goes:

if (exclusionList.stream().anyMatch(dirName::contains)) {
    Typewriter.debug("Directory excluded: " + promisesDir);
} else if (promisesDir.isRELP()) {
    final RelpPromise promise =
        new RelpPromise(
            archiveGenerateFilePath,
            masterGenerateFilePath,
            promisesDir,
            configuration
        );
    promiseList.add(promise);
  //Else should be just plain CFE-01
} else {
    final CFE01Promise promise =
        new CFE01Promise(
            archiveGenerateFilePath,
            masterGenerateFilePath,
            promisesDir,
            configuration
        );
    promiseList.add(promise);
}

So both the classes need to implement the same interface, or something, to work