From 31998916882f541b0b3b35056f20d8f3e49873d9 Mon Sep 17 00:00:00 2001 From: Ashan Thamara Palihakkara <75057725+ashanthamara@users.noreply.github.com> Date: Tue, 5 Dec 2023 20:54:53 +0530 Subject: [PATCH] Modified isAccessUrlAvailable() method --- .../carbon/identity/recovery/util/Utils.java | 24 +++++++++++-------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/util/Utils.java b/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/util/Utils.java index 53d940b5a4..ccbde142b9 100644 --- a/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/util/Utils.java +++ b/components/org.wso2.carbon.identity.recovery/src/main/java/org/wso2/carbon/identity/recovery/util/Utils.java @@ -719,18 +719,22 @@ public static String getCallbackURL(org.wso2.carbon.identity.recovery.model.Prop return callbackURL; } - public static boolean isAccessUrlAvailable(org.wso2.carbon.identity.recovery.model.Property[] properties) { - if (properties == null) { - return false; - } - boolean accessURL = false; - for (org.wso2.carbon.identity.recovery.model.Property property : properties) { - if (IdentityRecoveryConstants.IS_ACCESS_URL_AVAILABLE.equals(property.getKey())) { - accessURL = Boolean.parseBoolean(property.getValue()) ; - break; + /** + * Get isAccessUrlAvailable property value. + * + * @param properties Properties array. + * @return Boolean value of the isAccessUrlAvailable property. + */ + public static Boolean isAccessUrlAvailable(org.wso2.carbon.identity.recovery.model.Property[] properties) { + + if (properties != null) { + for (org.wso2.carbon.identity.recovery.model.Property property : properties) { + if (IdentityRecoveryConstants.IS_ACCESS_URL_AVAILABLE.equals(property.getKey())) { + return Boolean.parseBoolean(property.getValue()); + } } } - return accessURL; + return false; } /**