Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some additional sandbox annotations for blob refs #1974

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/main/java/sirius/biz/storage/layer2/BlobHardRef.java
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ public long fetchSize() {
* @return the formatted (human-readable) file size of the referenced blob or an empty string, if the reference
* is empty
*/
@NoodleSandbox(NoodleSandbox.Accessibility.GRANTED)
public String fetchFormattedSize() {
return fetchBlob().map(Blob::getSize).map(NLS::formatSize).orElse("");
}
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/sirius/biz/storage/layer2/BlobSoftRef.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import sirius.db.mixing.BaseEntity;
import sirius.db.mixing.types.BaseEntityRef;
import sirius.kernel.commons.Strings;
import sirius.pasta.noodle.sandbox.NoodleSandbox;

import javax.annotation.Nullable;
import java.util.regex.Pattern;
Expand Down Expand Up @@ -89,6 +90,7 @@ public String getPath() {
*
* @return <tt>true</tt> if a URL was stored, <tt>false</tt> if an object key or nothing yet is stored
*/
@NoodleSandbox(NoodleSandbox.Accessibility.GRANTED)
public boolean isURL() {
return supportsURL && Strings.isFilled(key) && URL_PATTERN.matcher(key).find();
}
Expand Down
Loading