Skip to content

Commit

Permalink
fix: corrected array java.lang.IndexOutOfBoundsException (#7670)
Browse files Browse the repository at this point in the history
* fix: fix array java.lang.IndexOutOfBoundsException

Signed-off-by: Arnab Dutta <arnab.bdutta@gmail.com>

* fix: fix array java.lang.IndexOutOfBoundsException

Signed-off-by: Arnab Dutta <arnab.bdutta@gmail.com>

---------

Signed-off-by: Arnab Dutta <arnab.bdutta@gmail.com>
Former-commit-id: 8f94b0a
  • Loading branch information
duttarnab authored Feb 7, 2024
1 parent 45aaec5 commit 66ce1a7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import jakarta.inject.Named;
import org.apache.commons.beanutils.BeanUtils;
import org.apache.commons.beanutils.BeanUtilsBean;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;

Expand Down Expand Up @@ -423,7 +424,7 @@ public List<CustomObjectAttribute> removeInActiveCustomAttribute(List<CustomObje
List<JansAttribute> attList = findAttributeByName(attributeName);
logger.debug("attributeName:{} data is attList: {}", attributeName, attList);

if (attList!=null && !GluuStatus.ACTIVE.getValue().equalsIgnoreCase(attList.get(0).getStatus().getValue())) {
if (CollectionUtils.isNotEmpty(attList) && !GluuStatus.ACTIVE.getValue().equalsIgnoreCase(attList.get(0).getStatus().getValue())) {
logger.info("Removing attribute as it is not active attributeName: {} , status:{}", attributeName, attList.get(0).getStatus().getValue());
it.remove();
}
Expand Down

0 comments on commit 66ce1a7

Please sign in to comment.