Skip to content

Commit

Permalink
OPHYK-395 remove apache commons-lang use
Browse files Browse the repository at this point in the history
  • Loading branch information
tokarls committed Dec 16, 2024
1 parent 6aeb051 commit 8771cfa
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import fi.vm.sade.kayttooikeus.service.external.OrganisaatioClient;
import fi.vm.sade.kayttooikeus.util.OrganisaatioMyontoPredicate;
import lombok.*;
import org.apache.commons.lang.BooleanUtils;
import org.springframework.util.CollectionUtils;
import org.springframework.util.StringUtils;

Expand Down Expand Up @@ -68,7 +67,7 @@ public AnomusCriteriaFunction<QAnomus, QKayttoOikeusRyhma, QHaettuKayttoOikeusRy

builder = this.condition(qAnomus, builder, this.getInSameOrganisationPredicate(organisaatioClient, qAnomus));

if (BooleanUtils.isTrue(this.adminView)) {
if (Boolean.TRUE.equals(this.adminView)) {
QKayttoOikeusRyhma qAdminViewKor = new QKayttoOikeusRyhma("adminViewKor");
QKayttoOikeus qAdminViewKo = new QKayttoOikeus("adminViewKo");
JPQLQuery<KayttoOikeusRyhma> adminViewSubquery = JPAExpressions.select(qAdminViewKor)
Expand All @@ -78,7 +77,7 @@ public AnomusCriteriaFunction<QAnomus, QKayttoOikeusRyhma, QHaettuKayttoOikeusRy
builder.and(qKayttoOikeusRyhma.in(adminViewSubquery));
}

if (BooleanUtils.isTrue(this.onlyActive)) {
if (Boolean.TRUE.equals(this.onlyActive)) {
builder.and(qHaettuKayttoOikeusRyhma.tyyppi.eq(KayttoOikeudenTila.ANOTTU)
.or(qHaettuKayttoOikeusRyhma.tyyppi.isNull()));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import fi.vm.sade.oppijanumerorekisteri.dto.*;
import lombok.RequiredArgsConstructor;

import org.apache.commons.lang.BooleanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Sort;
import org.springframework.stereotype.Service;
Expand Down Expand Up @@ -118,7 +117,7 @@ private void setCriteriaByUser(KutsuCriteria kutsuCriteria) {
} else {
organisaatioOidLimit = permissionCheckerService.getCurrentUserOrgnisationsWithPalveluRole(palveluRoolit);
}
if (BooleanUtils.isTrue(kutsuCriteria.getSubOrganisations())) {
if (Boolean.TRUE.equals(kutsuCriteria.getSubOrganisations())) {
organisaatioOidLimit = organisaatioOidLimit.stream()
.flatMap(organisaatioOid -> organisaatioClient.listWithChildOids(organisaatioOid,
new OrganisaatioMyontoPredicate(false)).stream())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import fi.vm.sade.kayttooikeus.config.properties.AuthProperties;
import fi.vm.sade.kayttooikeus.service.impl.CryptoServiceImpl;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
Expand Down

0 comments on commit 8771cfa

Please sign in to comment.