void (@Nullable SdkAdditionalData additionalData, @NotNull CredentialsType credentialsType) { if (!(additionalData instanceof RemoteSdkAdditionalData<?> data)) return; if (data.getRemoteConnectionType() != CredentialsType.UNKNOWN) return; String credentialsId = data.connectionCredentials().getId(); if (!credentialsType.hasPrefix(credentialsId)) return; Element root = new Element("root"); data.connectionCredentials().save(root); Object credentials = credentialsType.createCredentials(); try { credentialsType.getHandler(credentials).load(root); } catch (CredentialsCantBeLoaded e) { Logger.getInstance(CredentialsManager.class).warn(e); return; } data.setCredentials(credentialsType.getCredentialsKey(), credentials); }