String (@Nullable String urlFromGit) { if (urlFromGit != null && !StringUtil.isEmptyOrSpaces(urlFromGit)) { return urlFromGit; } else { if (myPresetUrl == null) throw new IllegalStateException("Invalid remote urls in handler"); return myPresetUrl; } }