Skip to content

Commit

Permalink
Fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
vladisavvv committed Nov 26, 2024
1 parent 905570b commit 155decc
Showing 1 changed file with 3 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,12 +349,6 @@ public ResourceStream getResourceStream(ResourceDescriptor resource, EtagHeader
String contentType = metadata.getContentMetadata().getContentType();
Long length = metadata.getContentMetadata().getContentLength();

// if (length <= maxSize) {
// result = blobToResult(blob, metadata);
// redisPut(key, result);
// return ResourceStream.fromResult(result, etagHeader);
// }

etagHeader.validate(etag);
return new ResourceStream(payload.openStream(), etag, contentType, length);
}
Expand Down Expand Up @@ -391,17 +385,9 @@ private ResourceItemMetadata putResource(
String newEtag = EtagBuilder.generateEtag(body);
Result result = new Result(body, newEtag, createdAt, updatedAt, contentType,
descriptor.getType().requireCompression(), (long) body.length, descriptor.getType().name(), false);
// if (body.length <= maxSize) {
// redisPut(redisKey, result);
// if (metadata == null) {
// String blobKey = blobKey(descriptor);
// blobPut(blobKey, result.toStub()); // create an empty object for listing
// }
// } else {
flushToBlobStore(redisKey);
String blobKey = blobKey(descriptor);
blobPut(blobKey, result);
// }
flushToBlobStore(redisKey);
String blobKey = blobKey(descriptor);
blobPut(blobKey, result);

ResourceEvent.Action action = metadata == null
? ResourceEvent.Action.CREATE
Expand Down

0 comments on commit 155decc

Please sign in to comment.