boolean (@NotNull Sdk sdk) { if (sdk.getSdkAdditionalData() instanceof PyRemoteSdkAdditionalDataBase) { final Ref<Boolean> result = Ref.create(false); ((PyRemoteSdkAdditionalDataBase)sdk.getSdkAdditionalData()).switchOnConnectionType( new LanguageCaseCollector<PyCredentialsContribution>() { @Override protected void processLanguageContribution(PyCredentialsContribution languageContribution, Object credentials) { result.set(!languageContribution.isValid(credentials)); } }.collectCases(PyCredentialsContribution.class)); return result.get(); } return false; }