diff --git a/udmis/src/main/java/com/google/bos/udmi/service/access/ImplicitIotAccessProvider.java b/udmis/src/main/java/com/google/bos/udmi/service/access/ImplicitIotAccessProvider.java index 55ff77b82..b37cc6a94 100644 --- a/udmis/src/main/java/com/google/bos/udmi/service/access/ImplicitIotAccessProvider.java +++ b/udmis/src/main/java/com/google/bos/udmi/service/access/ImplicitIotAccessProvider.java @@ -211,12 +211,12 @@ private Map 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; }