Closed MoonBow-1 closed 5 months ago
After creating ArchiveGenerateFile
and MasterGenerateFile
classes:
public final class MasterGenerateFile {
public final RelpGenerateFile generateFile;
public final Configuration configuration;
}
There is a problem with RELP files not being sent, so investigating that
Problem found to be archiving files not containing options
JSON field, leading to a method throwing an Exception about that:
Options.fromJson(JsonObject jsonObject)
JsonGenerateFile.getRelpGenerateFile()
RelpPromise.getArchiveGenerateFile()
RelpPromise.parse()
method, not sending anythingProblem was found to be the Promise.isValid()
check, where in the new comment it was changed to use the new GenerateFileComparisonResult.isValid
field, but it doesn't serve the same purpose as the Promise.isValid(Configuration conf)
method.
Rolled back to the old method and problem is now fixed
ArchiveGenerateFile
and MasterGenerateFile
structure now:
public final class MasterGenerateFile<T extends RelpGenerateFile> {
public final T generateFile;
public final Configuration configuration;
public MasterGenerateFile(
T generateFile,
Configuration configuration
) {
this.generateFile = generateFile;
this.configuration = configuration;
}
public GenerateFileComparisonResult compareTo(
final ArchiveGenerateFile<T> archiveGenerateFile) {
return this.generateFile.compareTo(
archiveGenerateFile.generateFile,
this.configuration.faultyReportFile,
this.configuration.discrepancyReportFile
);
}
...
}
Description
Methods:
should return different classes, e.g.
ArchiveGenerateFile
andMasterGenerateFile
.