From 02c43c0bed1b0d51674b5788bd0f3d79edb98f4e Mon Sep 17 00:00:00 2001 From: tpylak <tpylak> Date: Fri, 3 Oct 2008 09:35:07 +0000 Subject: [PATCH] minor: remove warnings SVN: 8527 --- .../client/web/client/application/ui/ColumnFilter.java | 5 +++-- .../cisd/openbis/generic/server/GenericServer.java | 9 +++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/ColumnFilter.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/ColumnFilter.java index db4a02d97fd..9c3546bc61b 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/ColumnFilter.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/client/web/client/application/ui/ColumnFilter.java @@ -39,11 +39,12 @@ public class ColumnFilter<T extends ModelData> extends StoreFilterField<T> } @Override - protected boolean doSelect(Store<T> store, T parent, T record, String property, String filter) + protected boolean doSelect(Store<T> store, T parent, T record, String property, + String filterText) { String name = record.get(column); name = name.toLowerCase(); - if (name.startsWith(filter.toLowerCase())) + if (name.startsWith(filterText.toLowerCase())) { return true; } diff --git a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/GenericServer.java b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/GenericServer.java index 1cd1139a574..06da9a7ea93 100644 --- a/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/GenericServer.java +++ b/openbis/source/java/ch/systemsx/cisd/openbis/generic/server/GenericServer.java @@ -272,14 +272,15 @@ public class GenericServer implements IGenericServer, ISessionProvider, { throw new UserFailureException("Given role does not exist."); } - if (roleAssignment.getPerson().compareTo(session.tryGetPerson()) == 0 + PersonPE personPE = session.tryGetPerson(); + if (roleAssignment.getPerson().compareTo(personPE) == 0 && roleAssignment.getRole().compareTo(RoleCode.ADMIN) == 0) { boolean isInstanceAdmin = false; - if (session != null && session.tryGetPerson() != null - && session.tryGetPerson().getRoleAssignments() != null) + if (personPE != null + && personPE.getRoleAssignments() != null) { - for (RoleAssignmentPE ra : session.tryGetPerson().getRoleAssignments()) + for (RoleAssignmentPE ra : personPE.getRoleAssignments()) { if (ra.getDatabaseInstance() != null && ra.getRole().equals(RoleCode.ADMIN)) { -- GitLab