Skip to content

Commit

Permalink
Merge pull request #1974 from scireum/feature/SE-13581-blob-ref-sandbox
Browse files Browse the repository at this point in the history
Add some additional sandbox annotations for blob refs
  • Loading branch information
jmuscireum authored Apr 11, 2024
2 parents 4e06f7e + 9d88e2e commit 2b3595d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
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

0 comments on commit 2b3595d

Please sign in to comment.