Skip to content

Commit

Permalink
Linty fix
Browse files Browse the repository at this point in the history
  • Loading branch information
grafnu committed Jan 18, 2025
1 parent d1dfe64 commit adfdc6e
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,12 @@ private Map<String, String> toDeviceMap(CloudModel cloudModel, String createdAt)
properties.put(BLOCKED_PROPERTY, booleanString(cloudModel.blocked));
ifNotNullThen(cloudModel.num_id, id -> properties.put(NUM_ID_PROPERTY, id));
ifNotNullThen(cloudModel.credentials, creds -> ifNotTrueThen(creds.isEmpty(), () -> {
checkState(creds.size() == 1, "only one credential supported");
Credential cred = creds.get(0);
checkState(cred.key_format == Key_format.PASSWORD,
"key type not supported: " + cred.key_format);
properties.put(AUTH_PASSWORD_PROPERTY, cred.key_data);
}));
checkState(creds.size() == 1, "only one credential supported");
Credential cred = creds.get(0);
checkState(cred.key_format == Key_format.PASSWORD,
"key type not supported: " + cred.key_format);
properties.put(AUTH_PASSWORD_PROPERTY, cred.key_data);
}));
return properties;
}

Expand Down

0 comments on commit adfdc6e

Please sign in to comment.