dev add method link
Test Workflow / test (push) Has been cancelled

This commit is contained in:
2026-05-06 14:09:15 +07:00
parent af4e4717d1
commit 0d943da120
@@ -171,17 +171,14 @@ public class ImageFoundRequestHandler implements RequestHandler {
// boolean hashesAreEqual = hashSearchApiFile.get("hi").equals(checkFileHash.getHash64Hi())
// && hashSearchApiFile.get("low").equals(checkFileHash.getHash64Lo());
switch (checkResult) {
case ImageCheckResult.Success success -> {
double watermarkCorrelation = success.getWatermarkCorrelation();
log.info("watermarkCorrelation: " + watermarkCorrelation);
if (checkResult instanceof ImageCheckResult.Success success) {
double watermarkCorrelation = success.getWatermarkCorrelation();
log.info("watermarkCorrelation: " + watermarkCorrelation);
if (watermarkCorrelation < 50.0) {
return new BaseResponse(request.getMsgId(), MessageCode.SUCCESS.getCode(),
"Not found similar pictures", new YandexSearchResponse());
}
if (watermarkCorrelation < 50.0) {
return new BaseResponse(request.getMsgId(), MessageCode.SUCCESS.getCode(),
"Not found similar pictures", new YandexSearchResponse());
}
default -> throw new IllegalStateException("Unexpected value: " + checkResult);
}
} finally {
if (tempFile != null) {