void (@NotNull RemoteSdkAdditionalData<?> data, @Nullable Project project) { if (!(data.getRemoteConnectionType() instanceof OutdatedCredentialsType)) { return; } //noinspection unchecked Pair<CredentialsType<Object>, Object> pair = ((OutdatedCredentialsType)data.getRemoteConnectionType()) .transformToNewerType(data.connectionCredentials().getCredentials(), project); data.setCredentials(pair.getFirst().getCredentialsKey(), pair.getSecond()); }