Skip to content

Commit cf2b78d

Browse files
Update aw-server/src/android/mod.rs
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
1 parent a6f165f commit cf2b78d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

aw-server/src/android/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,9 @@ pub mod android {
257257
hostname: JString,
258258
) -> jstring {
259259
let hostname = jstring_to_string(&env, hostname);
260+
if hostname.is_empty() {
261+
return create_error_object(&env, "hostname must not be empty".to_string());
262+
}
260263
match openDatastore().migrate_hostname(&hostname) {
261264
Ok(count) => {
262265
string_to_jstring(&env, format!("Migrated hostname for {} bucket(s)", count))

0 commit comments

Comments
 (0)