This is an automated email from the ASF dual-hosted git repository. ilgrosso pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/syncope.git
commit 5d1f4cf9f780a57a368288ef7026979a3430f604 Author: Samuel Garofalo <[email protected]> AuthorDate: Fri Oct 4 12:26:37 2024 +0200 [SYNCOPE-1828] check on null value (#857) --- .../console/authprofiles/AuthProfileDirectoryPanel.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/client/am/console/src/main/java/org/apache/syncope/client/console/authprofiles/AuthProfileDirectoryPanel.java b/client/am/console/src/main/java/org/apache/syncope/client/console/authprofiles/AuthProfileDirectoryPanel.java index b243ce15f7..f6e02fe580 100644 --- a/client/am/console/src/main/java/org/apache/syncope/client/console/authprofiles/AuthProfileDirectoryPanel.java +++ b/client/am/console/src/main/java/org/apache/syncope/client/console/authprofiles/AuthProfileDirectoryPanel.java @@ -24,6 +24,7 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; +import org.apache.commons.collections4.CollectionUtils; import org.apache.syncope.client.console.SyncopeConsoleSession; import org.apache.syncope.client.console.authprofiles.AuthProfileDirectoryPanel.AuthProfileProvider; import org.apache.syncope.client.console.commons.AMConstants; @@ -127,7 +128,7 @@ public class AuthProfileDirectoryPanel @Override protected boolean isCondition(final IModel<AuthProfileTO> rowModel) { - return !rowModel.getObject().getImpersonationAccounts().isEmpty(); + return CollectionUtils.isNotEmpty(rowModel.getObject().getImpersonationAccounts()); } }); columns.add(new BooleanConditionColumn<>(new StringResourceModel("googleMfaAuthTokens")) { @@ -136,7 +137,7 @@ public class AuthProfileDirectoryPanel @Override protected boolean isCondition(final IModel<AuthProfileTO> rowModel) { - return !rowModel.getObject().getGoogleMfaAuthTokens().isEmpty(); + return CollectionUtils.isNotEmpty(rowModel.getObject().getGoogleMfaAuthTokens()); } }); columns.add(new BooleanConditionColumn<>(new StringResourceModel("googleMfaAuthAccounts")) { @@ -145,7 +146,7 @@ public class AuthProfileDirectoryPanel @Override protected boolean isCondition(final IModel<AuthProfileTO> rowModel) { - return !rowModel.getObject().getGoogleMfaAuthAccounts().isEmpty(); + return CollectionUtils.isNotEmpty(rowModel.getObject().getGoogleMfaAuthAccounts()); } }); columns.add(new BooleanConditionColumn<>(new StringResourceModel("mfaTrustedDevices")) { @@ -154,7 +155,7 @@ public class AuthProfileDirectoryPanel @Override protected boolean isCondition(final IModel<AuthProfileTO> rowModel) { - return !rowModel.getObject().getMfaTrustedDevices().isEmpty(); + return CollectionUtils.isNotEmpty(rowModel.getObject().getMfaTrustedDevices()); } }); columns.add(new BooleanConditionColumn<>(new StringResourceModel("webAuthnAccount")) { @@ -163,7 +164,7 @@ public class AuthProfileDirectoryPanel @Override protected boolean isCondition(final IModel<AuthProfileTO> rowModel) { - return !rowModel.getObject().getWebAuthnDeviceCredentials().isEmpty(); + return CollectionUtils.isNotEmpty(rowModel.getObject().getWebAuthnDeviceCredentials()); } });
