diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/QueryKey.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/QueryKey.java index 5af240de84c8..5333450dad27 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/QueryKey.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/analytics/QueryKey.java @@ -32,7 +32,7 @@ import java.util.function.Supplier; import org.apache.commons.codec.digest.DigestUtils; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; /** * @author Lars Helge Overland diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/IdentifiableObjectUtils.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/IdentifiableObjectUtils.java index fb61477ec1f2..e74a29c0e43e 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/IdentifiableObjectUtils.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/IdentifiableObjectUtils.java @@ -36,7 +36,7 @@ import java.util.Map; import java.util.stream.Collectors; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.calendar.Calendar; import org.hisp.dhis.calendar.DateTimeUnit; import org.hisp.dhis.category.Category; diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/PagerUtils.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/PagerUtils.java index 79be127a09e3..607a5a785770 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/PagerUtils.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/PagerUtils.java @@ -31,7 +31,7 @@ import java.util.Collection; import java.util.List; -import org.apache.commons.lang.BooleanUtils; +import org.apache.commons.lang3.BooleanUtils; /** * @author Morten Olav Hansen diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryFilter.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryFilter.java index 063bd47dd5fa..d8caee358a68 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryFilter.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryFilter.java @@ -33,7 +33,7 @@ import java.util.function.Function; import java.util.stream.Collectors; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java index ddbd0bc62820..ea9587a84c61 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java @@ -33,7 +33,7 @@ import java.util.Objects; import java.util.stream.Collectors; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.analytics.AggregationType; import org.hisp.dhis.analytics.QueryKey; import org.hisp.dhis.dataelement.DataElement; diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/deduplication/PotentialDuplicateQuery.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/deduplication/PotentialDuplicateQuery.java index 2eb823cae99a..be5015232896 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/deduplication/PotentialDuplicateQuery.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/deduplication/PotentialDuplicateQuery.java @@ -31,7 +31,7 @@ import lombok.Data; -import org.apache.commons.lang.BooleanUtils; +import org.apache.commons.lang3.BooleanUtils; import org.hisp.dhis.common.Pager; import org.hisp.dhis.common.PagerUtils; diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/deletedobject/DeletedObjectQuery.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/deletedobject/DeletedObjectQuery.java index ecb631e6a4bf..4254c4d83ea1 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/deletedobject/DeletedObjectQuery.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/deletedobject/DeletedObjectQuery.java @@ -31,7 +31,7 @@ import java.util.Date; import java.util.List; -import org.apache.commons.lang.BooleanUtils; +import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.common.IdentifiableObject; import org.hisp.dhis.common.Pager; diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/minmax/MinMaxDataElementQueryParams.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/minmax/MinMaxDataElementQueryParams.java index 7d96fb44db87..3c8e7ff23794 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/minmax/MinMaxDataElementQueryParams.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/minmax/MinMaxDataElementQueryParams.java @@ -29,7 +29,7 @@ import java.util.List; -import org.apache.commons.lang.BooleanUtils; +import org.apache.commons.lang3.BooleanUtils; import org.hisp.dhis.common.Pager; import org.hisp.dhis.common.PagerUtils; diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java index 3d5a70f95af9..57cde7a51952 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/period/RelativePeriods.java @@ -34,7 +34,7 @@ import java.util.stream.IntStream; import java.util.stream.Stream; -import org.apache.commons.lang.ArrayUtils; +import org.apache.commons.lang3.ArrayUtils; import org.hisp.dhis.analytics.AnalyticsFinancialYearStartKey; import org.hisp.dhis.calendar.DateTimeUnit; import org.hisp.dhis.calendar.impl.Iso8601Calendar; diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/security/AuthenticationSerializer.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/security/AuthenticationSerializer.java index 1bb796dad681..882150509173 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/security/AuthenticationSerializer.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/security/AuthenticationSerializer.java @@ -29,7 +29,7 @@ import javax.xml.bind.DatatypeConverter; -import org.apache.commons.lang.SerializationUtils; +import org.apache.commons.lang3.SerializationUtils; import org.springframework.security.core.Authentication; public class AuthenticationSerializer diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlViewQuery.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlViewQuery.java index 55bd103516fc..4bcddc1461d3 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlViewQuery.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/sqlview/SqlViewQuery.java @@ -29,7 +29,7 @@ import java.util.Set; -import org.apache.commons.lang.BooleanUtils; +import org.apache.commons.lang3.BooleanUtils; import org.hisp.dhis.common.Pager; import org.hisp.dhis.common.PagerUtils; diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceQueryParams.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceQueryParams.java index 432218a64321..bcfb33edfc17 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceQueryParams.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/trackedentity/TrackedEntityInstanceQueryParams.java @@ -43,7 +43,7 @@ import lombok.Getter; import org.apache.commons.collections.CollectionUtils; -import org.apache.commons.lang.time.DateUtils; +import org.apache.commons.lang3.time.DateUtils; import org.hisp.dhis.common.AssignedUserSelectionMode; import org.hisp.dhis.common.OrganisationUnitSelectionMode; import org.hisp.dhis.common.QueryFilter; diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationResult.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationResult.java index db1fa3cde99a..043a6fa81a7a 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationResult.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/ValidationResult.java @@ -30,7 +30,7 @@ import java.io.Serializable; import java.util.Date; -import org.apache.commons.lang.builder.CompareToBuilder; +import org.apache.commons.lang3.builder.CompareToBuilder; import org.hisp.dhis.category.CategoryOptionCombo; import org.hisp.dhis.common.BaseIdentifiableObject; import org.hisp.dhis.common.DxfNamespaces; diff --git a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/comparator/ValidationResultQuery.java b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/comparator/ValidationResultQuery.java index 86f444f98cb6..79d3fc20333a 100644 --- a/dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/comparator/ValidationResultQuery.java +++ b/dhis-2/dhis-api/src/main/java/org/hisp/dhis/validation/comparator/ValidationResultQuery.java @@ -30,7 +30,7 @@ import java.util.Date; import java.util.List; -import org.apache.commons.lang.BooleanUtils; +import org.apache.commons.lang3.BooleanUtils; import org.hisp.dhis.common.Pager; import org.hisp.dhis.common.PagerUtils; diff --git a/dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/DefaultSqlViewService.java b/dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/DefaultSqlViewService.java index 2c272ec355db..c7cb3ed46409 100644 --- a/dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/DefaultSqlViewService.java +++ b/dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/sqlview/DefaultSqlViewService.java @@ -38,7 +38,6 @@ import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.ObjectUtils; import org.hisp.dhis.common.Grid; import org.hisp.dhis.common.IllegalQueryException; @@ -199,7 +198,7 @@ private void canAccess( SqlView sqlView ) private String parseFilters( List filters, SqlHelper sqlHelper ) throws QueryParserException { - String query = StringUtils.EMPTY; + String query = ""; for ( String filter : filters ) { @@ -221,7 +220,7 @@ private String parseFilters( List filters, SqlHelper sqlHelper ) private String getFilterQuery( SqlHelper sqlHelper, String columnName, String operator, String value ) { - String query = StringUtils.EMPTY; + String query = ""; query += sqlHelper.whereAnd() + " " + columnName + " " + QueryUtils.parseFilterOperator( operator, value ); @@ -307,7 +306,7 @@ private String getSqlForView( SqlView sqlView, Map criteria, Lis private String getCriteriaSqlClause( Map criteria, SqlHelper sqlHelper ) { - String sql = StringUtils.EMPTY; + String sql = ""; if ( criteria != null && !criteria.isEmpty() ) { diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcAnalyticsManager.java b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcAnalyticsManager.java index e967fd31c937..86b90e8fb130 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcAnalyticsManager.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcAnalyticsManager.java @@ -28,7 +28,7 @@ package org.hisp.dhis.analytics.data; import static com.google.common.base.Preconditions.checkNotNull; -import static org.apache.commons.lang.time.DateUtils.addYears; +import static org.apache.commons.lang3.time.DateUtils.addYears; import static org.hisp.dhis.analytics.AggregationType.AVERAGE; import static org.hisp.dhis.analytics.AggregationType.COUNT; import static org.hisp.dhis.analytics.AggregationType.MAX; diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcRawAnalyticsManager.java b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcRawAnalyticsManager.java index 84d92a38ddfd..0858c66825b8 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcRawAnalyticsManager.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/data/JdbcRawAnalyticsManager.java @@ -40,7 +40,7 @@ import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.analytics.DataQueryParams; import org.hisp.dhis.analytics.RawAnalyticsManager; import org.hisp.dhis.analytics.util.AnalyticsUtils; diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/EnrollmentTimeFieldSqlRenderer.java b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/EnrollmentTimeFieldSqlRenderer.java index 9f5985b35638..358ac337bd14 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/EnrollmentTimeFieldSqlRenderer.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/EnrollmentTimeFieldSqlRenderer.java @@ -49,7 +49,7 @@ import lombok.Getter; import lombok.RequiredArgsConstructor; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.analytics.TimeField; import org.hisp.dhis.analytics.event.EventQueryParams; import org.hisp.dhis.common.DimensionalItemObject; diff --git a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java index 94a0a1a49cd4..ea120a99efbb 100644 --- a/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java +++ b/dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/event/data/JdbcEventAnalyticsManager.java @@ -27,7 +27,7 @@ */ package org.hisp.dhis.analytics.event.data; -import static org.apache.commons.lang.time.DateUtils.addYears; +import static org.apache.commons.lang3.time.DateUtils.addYears; import static org.hisp.dhis.analytics.event.EventAnalyticsService.ITEM_LATITUDE; import static org.hisp.dhis.analytics.event.EventAnalyticsService.ITEM_LONGITUDE; import static org.hisp.dhis.analytics.table.JdbcEventAnalyticsTableManager.OU_GEOMETRY_COL_SUFFIX; diff --git a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java index 0dfbe9e6b2b3..d5d9335849a2 100644 --- a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java +++ b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/message/DefaultMessageService.java @@ -40,7 +40,7 @@ import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.commons.util.DebugUtils; import org.hisp.dhis.configuration.ConfigurationService; import org.hisp.dhis.dataset.CompleteDataSetRegistration; diff --git a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/hibernate/HibernateOrganisationUnitStore.java b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/hibernate/HibernateOrganisationUnitStore.java index b411f95951e4..c0d298b78a46 100644 --- a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/hibernate/HibernateOrganisationUnitStore.java +++ b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/organisationunit/hibernate/HibernateOrganisationUnitStore.java @@ -40,7 +40,7 @@ import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.query.Query; diff --git a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramIndicatorService.java b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramIndicatorService.java index d206860b7a6a..2fdb3209b1b2 100644 --- a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramIndicatorService.java +++ b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/DefaultProgramIndicatorService.java @@ -70,7 +70,7 @@ import java.util.Map; import java.util.Set; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.antlr.Parser; import org.hisp.dhis.antlr.ParserException; import org.hisp.dhis.cache.Cache; diff --git a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramInstanceStore.java b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramInstanceStore.java index e55a94edcda7..b465187d1fd3 100644 --- a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramInstanceStore.java +++ b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramInstanceStore.java @@ -51,8 +51,8 @@ import lombok.Builder; import lombok.Getter; -import org.apache.commons.lang.StringUtils; -import org.apache.commons.lang.time.DateUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.time.DateUtils; import org.apache.commons.lang3.tuple.Pair; import org.hibernate.SessionFactory; import org.hibernate.query.Query; diff --git a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java index ddea64aa2fac..fdf875f64c3c 100644 --- a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java +++ b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java @@ -38,7 +38,7 @@ import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; -import org.apache.commons.lang.time.DateUtils; +import org.apache.commons.lang3.time.DateUtils; import org.hibernate.SessionFactory; import org.hibernate.query.Query; import org.hisp.dhis.common.hibernate.SoftDeleteHibernateObjectStore; diff --git a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/notification/DefaultProgramNotificationService.java b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/notification/DefaultProgramNotificationService.java index 4fda743d2fbd..bc6ef06e86d5 100644 --- a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/notification/DefaultProgramNotificationService.java +++ b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/program/notification/DefaultProgramNotificationService.java @@ -46,8 +46,8 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.BooleanUtils; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.BooleanUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.common.DeliveryChannel; import org.hisp.dhis.common.IdentifiableObjectManager; import org.hisp.dhis.eventdatavalue.EventDataValue; diff --git a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/JpaQueryUtils.java b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/JpaQueryUtils.java index 7b301bd732a8..e09b14343fe3 100644 --- a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/JpaQueryUtils.java +++ b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/JpaQueryUtils.java @@ -43,7 +43,7 @@ import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.common.BaseIdentifiableObject; import org.hisp.dhis.commons.collection.CollectionUtils; import org.hisp.dhis.hibernate.jsonb.type.JsonbFunctions; diff --git a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/QueryUtils.java b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/QueryUtils.java index 603574f8041e..d28b7d4d9b56 100644 --- a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/QueryUtils.java +++ b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/query/QueryUtils.java @@ -41,8 +41,8 @@ import javax.annotation.Nullable; import javax.persistence.TypedQuery; -import org.apache.commons.lang.StringUtils; -import org.apache.commons.lang.math.NumberUtils; +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.math.NumberUtils; import org.hisp.dhis.schema.Property; import org.hisp.dhis.schema.Schema; import org.hisp.dhis.util.DateUtils; diff --git a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/oidc/GenericOidcProviderConfigParser.java b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/oidc/GenericOidcProviderConfigParser.java index 6569e3d09558..2c45673a6fcb 100644 --- a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/oidc/GenericOidcProviderConfigParser.java +++ b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/security/oidc/GenericOidcProviderConfigParser.java @@ -62,7 +62,7 @@ import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Pair; import org.apache.commons.validator.routines.UrlValidator; import org.hisp.dhis.security.oidc.provider.GenericOidcProviderBuilder; diff --git a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/listener/CommandSMSListener.java b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/listener/CommandSMSListener.java index ff8cb3a3f63d..a1009de08a81 100644 --- a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/listener/CommandSMSListener.java +++ b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/listener/CommandSMSListener.java @@ -41,7 +41,7 @@ import java.util.regex.Pattern; import java.util.stream.Collectors; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.category.CategoryService; import org.hisp.dhis.dataelement.DataElement; import org.hisp.dhis.eventdatavalue.EventDataValue; diff --git a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/listener/CompressionSMSListener.java b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/listener/CompressionSMSListener.java index f45a4514e93d..e6170df5db29 100644 --- a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/listener/CompressionSMSListener.java +++ b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/listener/CompressionSMSListener.java @@ -38,7 +38,7 @@ import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.category.CategoryOptionCombo; import org.hisp.dhis.category.CategoryService; import org.hisp.dhis.common.IdentifiableObject; diff --git a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/listener/DataValueSMSListener.java b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/listener/DataValueSMSListener.java index 39ad00154038..d0540cdf7423 100644 --- a/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/listener/DataValueSMSListener.java +++ b/dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/sms/listener/DataValueSMSListener.java @@ -149,7 +149,7 @@ protected void postProcess( IncomingSms sms, SMSCommand smsCommand, Maporg.apache.commons commons-collections4 + + org.apache.commons + commons-text + net.sourceforge.javacsv javacsv diff --git a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/dataset/JdbcCompleteDataSetRegistrationExchangeStore.java b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/dataset/JdbcCompleteDataSetRegistrationExchangeStore.java index db5ef8fb3779..e61da4e22dd5 100644 --- a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/dataset/JdbcCompleteDataSetRegistrationExchangeStore.java +++ b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/dataset/JdbcCompleteDataSetRegistrationExchangeStore.java @@ -36,7 +36,7 @@ import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.commons.text.StringSubstitutor; import org.hisp.dhis.calendar.Calendar; import org.hisp.dhis.common.IdSchemes; diff --git a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/AbstractEnrollmentService.java b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/AbstractEnrollmentService.java index 91c67e326d51..c2cd725d8cdc 100644 --- a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/AbstractEnrollmentService.java +++ b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/enrollment/AbstractEnrollmentService.java @@ -46,7 +46,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.collections4.SetValuedMap; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.common.CodeGenerator; import org.hisp.dhis.common.IdSchemes; import org.hisp.dhis.common.IdentifiableObjectManager; diff --git a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java index ac8ebde1b25f..c9190ec668b7 100644 --- a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java +++ b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java @@ -64,7 +64,7 @@ import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.cache.Cache; import org.hisp.dhis.category.CategoryOption; import org.hisp.dhis.category.CategoryOptionCombo; diff --git a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/importer/context/AttributeOptionComboLoader.java b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/importer/context/AttributeOptionComboLoader.java index 33d463f1ab25..1437ea4aea24 100644 --- a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/importer/context/AttributeOptionComboLoader.java +++ b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/importer/context/AttributeOptionComboLoader.java @@ -38,7 +38,7 @@ import java.util.Set; import java.util.stream.Collectors; -import org.apache.commons.lang.text.StrSubstitutor; +import org.apache.commons.text.StringSubstitutor; import org.hisp.dhis.category.CategoryCombo; import org.hisp.dhis.category.CategoryOption; import org.hisp.dhis.category.CategoryOptionCombo; @@ -252,7 +252,7 @@ private CategoryOptionCombo getAttributeOptionCombo( IdScheme idScheme, String c .map( s -> "'" + s + "'" ) .collect( Collectors.joining( "," ) ); - StrSubstitutor sub = new StrSubstitutor( ImmutableMap. builder() + StringSubstitutor sub = new StringSubstitutor( ImmutableMap. builder() .put( "resolvedScheme", Objects.requireNonNull( categoryComboKey ) ) .put( "option_ids", optionsId ) .build() ); @@ -288,7 +288,7 @@ private CategoryOptionCombo loadCategoryOptionCombo( IdScheme idScheme, String i { String key = "categoryoptioncomboid"; - StrSubstitutor sub = new StrSubstitutor( ImmutableMap. builder() + StringSubstitutor sub = new StringSubstitutor( ImmutableMap. builder() .put( "key", key ) .put( "resolvedScheme", Objects.requireNonNull( resolveId( idScheme, key, id ) ) ) .build() ); diff --git a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/importer/context/ProgramSupplier.java b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/importer/context/ProgramSupplier.java index 040e12bcabde..08e8975b2d19 100644 --- a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/importer/context/ProgramSupplier.java +++ b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/importer/context/ProgramSupplier.java @@ -42,7 +42,7 @@ import lombok.Data; import org.apache.commons.collections.MapUtils; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.cache.Cache; import org.hisp.dhis.cache.CacheProvider; import org.hisp.dhis.category.CategoryCombo; diff --git a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/DefaultGmlImportService.java b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/DefaultGmlImportService.java index 7a73d1876c54..70b0c123b0b7 100644 --- a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/DefaultGmlImportService.java +++ b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/gml/DefaultGmlImportService.java @@ -43,7 +43,7 @@ import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.exception.ExceptionUtils; +import org.apache.commons.lang3.exception.ExceptionUtils; import org.hisp.dhis.common.*; import org.hisp.dhis.dxf2.metadata.Metadata; import org.hisp.dhis.dxf2.metadata.MetadataImportParams; diff --git a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/sync/DefaultMetadataSyncService.java b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/sync/DefaultMetadataSyncService.java index d172abc2dd17..873a84e083ea 100644 --- a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/sync/DefaultMetadataSyncService.java +++ b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/sync/DefaultMetadataSyncService.java @@ -34,7 +34,7 @@ import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.dxf2.metadata.AtomicMode; import org.hisp.dhis.dxf2.metadata.MetadataImportParams; import org.hisp.dhis.dxf2.metadata.sync.exception.DhisVersionMismatchException; diff --git a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/version/DefaultMetadataVersionService.java b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/version/DefaultMetadataVersionService.java index d011b4677604..526e6b6f4c03 100644 --- a/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/version/DefaultMetadataVersionService.java +++ b/dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/metadata/version/DefaultMetadataVersionService.java @@ -39,7 +39,7 @@ import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.dxf2.common.HashCodeGenerator; import org.hisp.dhis.dxf2.metadata.MetadataExportParams; import org.hisp.dhis.dxf2.metadata.MetadataExportService; diff --git a/dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/datavalueset/DataValueSetServiceTest.java b/dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/datavalueset/DataValueSetServiceTest.java index 170fa55ea3e0..52570f9d1024 100644 --- a/dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/datavalueset/DataValueSetServiceTest.java +++ b/dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/datavalueset/DataValueSetServiceTest.java @@ -43,7 +43,7 @@ import java.util.Iterator; import java.util.List; -import org.apache.commons.lang.time.DateUtils; +import org.apache.commons.lang3.time.DateUtils; import org.hisp.dhis.TransactionalIntegrationTest; import org.hisp.dhis.attribute.Attribute; import org.hisp.dhis.attribute.AttributeService; diff --git a/dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/importer/context/AttributeOptionComboLoaderTest.java b/dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/importer/context/AttributeOptionComboLoaderTest.java index 56bc6638ee0a..373557a682a2 100644 --- a/dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/importer/context/AttributeOptionComboLoaderTest.java +++ b/dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/events/importer/context/AttributeOptionComboLoaderTest.java @@ -47,7 +47,7 @@ import java.util.HashMap; import java.util.Map; -import org.apache.commons.lang.text.StrSubstitutor; +import org.apache.commons.lang3.text.StrSubstitutor; import org.hisp.dhis.category.CategoryCombo; import org.hisp.dhis.category.CategoryOption; import org.hisp.dhis.category.CategoryOptionCombo; diff --git a/dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata/version/DefaultMetadataVersionServiceTest.java b/dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata/version/DefaultMetadataVersionServiceTest.java index 66076ac7d61a..61f0e203efc1 100644 --- a/dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata/version/DefaultMetadataVersionServiceTest.java +++ b/dhis-2/dhis-services/dhis-service-dxf2/src/test/java/org/hisp/dhis/dxf2/metadata/version/DefaultMetadataVersionServiceTest.java @@ -36,7 +36,7 @@ import java.util.Date; import java.util.List; -import org.apache.commons.lang.time.DateUtils; +import org.apache.commons.lang3.time.DateUtils; import org.hisp.dhis.TransactionalIntegrationTest; import org.hisp.dhis.common.IdentifiableObjectManager; import org.hisp.dhis.dataelement.DataElement; diff --git a/dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/dashboard/DashboardServiceTest.java b/dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/dashboard/DashboardServiceTest.java index 1bc9bd4253d1..fa641e9d4065 100644 --- a/dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/dashboard/DashboardServiceTest.java +++ b/dhis-2/dhis-services/dhis-service-reporting/src/test/java/org/hisp/dhis/dashboard/DashboardServiceTest.java @@ -36,7 +36,7 @@ import java.util.List; import java.util.stream.IntStream; -import org.apache.commons.lang.RandomStringUtils; +import org.apache.commons.lang3.RandomStringUtils; import org.hisp.dhis.DhisSpringTest; import org.hisp.dhis.common.IdentifiableObjectManager; import org.hisp.dhis.document.Document; diff --git a/dhis-2/dhis-services/dhis-service-setting/src/main/java/org/hisp/dhis/setting/SystemSetting.java b/dhis-2/dhis-services/dhis-service-setting/src/main/java/org/hisp/dhis/setting/SystemSetting.java index a8e2ba14a1b8..b1c03769809c 100644 --- a/dhis-2/dhis-services/dhis-service-setting/src/main/java/org/hisp/dhis/setting/SystemSetting.java +++ b/dhis-2/dhis-services/dhis-service-setting/src/main/java/org/hisp/dhis/setting/SystemSetting.java @@ -35,7 +35,7 @@ import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringEscapeUtils; +import org.apache.commons.lang3.StringEscapeUtils; import org.hisp.dhis.commons.jackson.config.JacksonObjectMapperConfig; import com.fasterxml.jackson.core.JsonProcessingException; diff --git a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/report/TrackerReportUtils.java b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/report/TrackerReportUtils.java index 1a2bf9933cdc..4929629bb9e4 100644 --- a/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/report/TrackerReportUtils.java +++ b/dhis-2/dhis-services/dhis-service-tracker/src/main/java/org/hisp/dhis/tracker/report/TrackerReportUtils.java @@ -33,7 +33,7 @@ import java.util.List; import java.util.stream.Collectors; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.common.IdentifiableObject; import org.hisp.dhis.tracker.TrackerIdentifier; import org.hisp.dhis.tracker.bundle.TrackerBundle; diff --git a/dhis-2/dhis-services/dhis-service-validation/src/main/java/org/hisp/dhis/validation/notification/DefaultValidationNotificationService.java b/dhis-2/dhis-services/dhis-service-validation/src/main/java/org/hisp/dhis/validation/notification/DefaultValidationNotificationService.java index 429b2cd85b8e..c82b35403722 100644 --- a/dhis-2/dhis-services/dhis-service-validation/src/main/java/org/hisp/dhis/validation/notification/DefaultValidationNotificationService.java +++ b/dhis-2/dhis-services/dhis-service-validation/src/main/java/org/hisp/dhis/validation/notification/DefaultValidationNotificationService.java @@ -49,7 +49,7 @@ import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.BooleanUtils; +import org.apache.commons.lang3.BooleanUtils; import org.apache.commons.lang3.builder.CompareToBuilder; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; diff --git a/dhis-2/dhis-services/dhis-service-validation/src/test/java/org/hisp/dhis/validation/ValidationNotificationServiceTest.java b/dhis-2/dhis-services/dhis-service-validation/src/test/java/org/hisp/dhis/validation/ValidationNotificationServiceTest.java index d72ef357d087..16769191fc9b 100644 --- a/dhis-2/dhis-services/dhis-service-validation/src/test/java/org/hisp/dhis/validation/ValidationNotificationServiceTest.java +++ b/dhis-2/dhis-services/dhis-service-validation/src/test/java/org/hisp/dhis/validation/ValidationNotificationServiceTest.java @@ -43,8 +43,8 @@ import java.util.stream.Collectors; import java.util.stream.IntStream; -import org.apache.commons.lang.StringUtils; import org.apache.commons.lang3.RandomUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.DhisConvenienceTest; import org.hisp.dhis.category.CategoryOptionCombo; import org.hisp.dhis.expression.Operator; diff --git a/dhis-2/dhis-support/dhis-support-expression-parser/pom.xml b/dhis-2/dhis-support/dhis-support-expression-parser/pom.xml index 722f90fd408c..a1141145d987 100644 --- a/dhis-2/dhis-support/dhis-support-expression-parser/pom.xml +++ b/dhis-2/dhis-support/dhis-support-expression-parser/pom.xml @@ -36,6 +36,14 @@ org.apache.commons commons-text + + + + commons-lang + commons-lang + 2.6 + + junit junit diff --git a/dhis-2/dhis-support/dhis-support-hibernate/pom.xml b/dhis-2/dhis-support/dhis-support-hibernate/pom.xml index 289e42e49eb9..edf18867a187 100644 --- a/dhis-2/dhis-support/dhis-support-hibernate/pom.xml +++ b/dhis-2/dhis-support/dhis-support-hibernate/pom.xml @@ -135,6 +135,11 @@ bcprov-jdk15on + + org.apache.commons + commons-lang3 + + ../../ diff --git a/dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/datasource/DefaultReadOnlyDataSourceManager.java b/dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/datasource/DefaultReadOnlyDataSourceManager.java index a6fb21fe96c4..1bcd24012304 100644 --- a/dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/datasource/DefaultReadOnlyDataSourceManager.java +++ b/dhis-2/dhis-support/dhis-support-hibernate/src/main/java/org/hisp/dhis/datasource/DefaultReadOnlyDataSourceManager.java @@ -42,7 +42,7 @@ import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.commons.util.DebugUtils; import org.hisp.dhis.external.conf.ConfigurationKey; import org.hisp.dhis.external.conf.DhisConfigurationProvider; diff --git a/dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/monitoring/metrics/HibernateMetricsConfig.java b/dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/monitoring/metrics/HibernateMetricsConfig.java index ef8df4bd248e..6117b96e9f68 100644 --- a/dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/monitoring/metrics/HibernateMetricsConfig.java +++ b/dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/monitoring/metrics/HibernateMetricsConfig.java @@ -35,7 +35,7 @@ import javax.persistence.EntityManagerFactory; import javax.persistence.PersistenceException; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hibernate.SessionFactory; import org.hisp.dhis.external.conf.ConfigurationKey; import org.springframework.beans.factory.annotation.Autowired; diff --git a/dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/HttpUtils.java b/dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/HttpUtils.java index 0ae2c55da34c..143ba4c183a8 100644 --- a/dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/HttpUtils.java +++ b/dhis-2/dhis-support/dhis-support-system/src/main/java/org/hisp/dhis/system/util/HttpUtils.java @@ -37,7 +37,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.IOUtils; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.http.Header; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; diff --git a/dhis-2/dhis-web-api-test/src/test/java/org/hisp/dhis/webapi/controller/event/TrackedEntityCriteriaMapperTest.java b/dhis-2/dhis-web-api-test/src/test/java/org/hisp/dhis/webapi/controller/event/TrackedEntityCriteriaMapperTest.java index 6182671ee86c..6758429b2e21 100644 --- a/dhis-2/dhis-web-api-test/src/test/java/org/hisp/dhis/webapi/controller/event/TrackedEntityCriteriaMapperTest.java +++ b/dhis-2/dhis-web-api-test/src/test/java/org/hisp/dhis/webapi/controller/event/TrackedEntityCriteriaMapperTest.java @@ -38,7 +38,7 @@ import java.util.Collections; import java.util.HashSet; -import org.apache.commons.lang.time.DateUtils; +import org.apache.commons.lang3.time.DateUtils; import org.hisp.dhis.common.AssignedUserSelectionMode; import org.hisp.dhis.common.IllegalQueryException; import org.hisp.dhis.common.OrganisationUnitSelectionMode; diff --git a/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ConfigurationController.java b/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ConfigurationController.java index 47eb6cb8f4ff..811b5341bdff 100644 --- a/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ConfigurationController.java +++ b/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/ConfigurationController.java @@ -35,7 +35,7 @@ import javax.servlet.http.HttpServletRequest; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.appmanager.AppManager; import org.hisp.dhis.common.BaseIdentifiableObject; import org.hisp.dhis.common.DhisApiVersion; diff --git a/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.java b/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.java index cb064b145da1..e9b0b374045d 100644 --- a/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.java +++ b/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/SystemSettingController.java @@ -49,7 +49,7 @@ import lombok.AllArgsConstructor; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.common.DhisApiVersion; import org.hisp.dhis.dxf2.webmessage.WebMessage; import org.hisp.dhis.dxf2.webmessage.WebMessageException; diff --git a/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/metadata/version/MetadataVersionController.java b/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/metadata/version/MetadataVersionController.java index 733c1c4161b3..1d7797629dc1 100644 --- a/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/metadata/version/MetadataVersionController.java +++ b/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/metadata/version/MetadataVersionController.java @@ -39,7 +39,7 @@ import javax.servlet.http.HttpServletResponse; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hisp.dhis.common.DhisApiVersion; import org.hisp.dhis.common.cache.CacheStrategy; import org.hisp.dhis.dxf2.metadata.version.exception.MetadataVersionServiceException; diff --git a/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/handler/CustomExceptionMappingAuthenticationFailureHandler.java b/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/handler/CustomExceptionMappingAuthenticationFailureHandler.java index 3170adad9cd1..30a472a0e1ac 100644 --- a/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/handler/CustomExceptionMappingAuthenticationFailureHandler.java +++ b/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/handler/CustomExceptionMappingAuthenticationFailureHandler.java @@ -33,7 +33,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.commons.lang.exception.ExceptionUtils; +import org.apache.commons.lang3.exception.ExceptionUtils; import org.hisp.dhis.i18n.I18n; import org.hisp.dhis.i18n.I18nManager; import org.springframework.security.authentication.LockedException; diff --git a/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/security/EmbeddedJettyBasicAuthenticationEntryPoint.java b/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/security/EmbeddedJettyBasicAuthenticationEntryPoint.java index 1d70cbd2d7a6..3aa08962fb9c 100644 --- a/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/security/EmbeddedJettyBasicAuthenticationEntryPoint.java +++ b/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/security/EmbeddedJettyBasicAuthenticationEntryPoint.java @@ -34,7 +34,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.commons.lang.exception.ExceptionUtils; +import org.apache.commons.lang3.exception.ExceptionUtils; import org.hisp.dhis.render.RenderService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; diff --git a/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/security/FormLoginBasicAuthenticationEntryPoint.java b/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/security/FormLoginBasicAuthenticationEntryPoint.java index c6571afb80f6..8585e74840d8 100644 --- a/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/security/FormLoginBasicAuthenticationEntryPoint.java +++ b/dhis-2/dhis-web-api/src/main/java/org/hisp/dhis/webapi/security/FormLoginBasicAuthenticationEntryPoint.java @@ -35,7 +35,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.commons.lang.exception.ExceptionUtils; +import org.apache.commons.lang3.exception.ExceptionUtils; import org.hisp.dhis.render.RenderService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; diff --git a/dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/i18n/action/TranslateAction.java b/dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/i18n/action/TranslateAction.java index 892f8df7b273..d142204b8585 100644 --- a/dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/i18n/action/TranslateAction.java +++ b/dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/i18n/action/TranslateAction.java @@ -38,8 +38,8 @@ import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.ArrayUtils; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.ArrayUtils; +import org.apache.commons.lang3.StringUtils; import org.apache.struts2.ServletActionContext; import org.hisp.dhis.common.IdentifiableObject; import org.hisp.dhis.common.IdentifiableObjectManager; diff --git a/dhis-2/pom.xml b/dhis-2/pom.xml index a80f9a307089..6a880f26392a 100644 --- a/dhis-2/pom.xml +++ b/dhis-2/pom.xml @@ -1162,10 +1162,6 @@ velocity ${velocity.version} - - commons-lang - commons-lang - commons-collections commons-collections