From e21b287bfc26d76e34e962cfd0e7efeed4225f23 Mon Sep 17 00:00:00 2001 From: David Horwitz Date: Mon, 11 Mar 2019 09:55:32 +0200 Subject: [PATCH] SAK-41467 commons-lang => commons-lang3 (#6627) calendar, chat, ciktations, common, commens, --- calendar/calendar-impl/impl/pom.xml | 4 +- .../calendar/impl/BaseCalendarService.java | 2 +- calendar/calendar-summary-tool/tool/pom.xml | 4 +- .../tool/summarycalendar/ui/CalendarBean.java | 2 +- calendar/calendar-tool/tool/pom.xml | 4 ++ .../CalendarEventEntityProvider.java | 4 +- .../calendar/tool/CalendarAction.java | 2 +- chat/chat-impl/impl/pom.xml | 4 +- .../chat2/model/impl/ChatManagerImpl.java | 4 +- .../model/impl/ChatMessageEntityProvider.java | 2 +- chat/chat-tool/tool/pom.xml | 4 +- .../org/sakaiproject/chat2/tool/ChatTool.java | 2 +- .../chat2/tool/DecoratedChatChannel.java | 2 +- citations/citations-impl/impl/pom.xml | 4 +- .../citation/impl/BaseCitationService.java | 2 +- .../impl/NestedCitationValidator.java | 11 ++++-- common/archive-impl/impl2/pom.xml | 4 +- .../archive/impl/ArchiveService2Impl.java | 2 +- common/common-composite-component/pom.xml | 10 ++--- .../edu/person/SakaiPersonManagerImpl.java | 2 +- commons/api/pom.xml | 4 +- .../commons/api/datamodel/Comment.java | 4 +- commons/impl/pom.xml | 4 +- .../impl/CommonsSecurityManagerImpl.java | 2 +- commons/tool/pom.xml | 4 +- .../entityprovider/CommonsEntityProvider.java | 37 ++++++++++++------- 26 files changed, 72 insertions(+), 58 deletions(-) diff --git a/calendar/calendar-impl/impl/pom.xml b/calendar/calendar-impl/impl/pom.xml index 107ee330ab0d..348062abc271 100644 --- a/calendar/calendar-impl/impl/pom.xml +++ b/calendar/calendar-impl/impl/pom.xml @@ -52,8 +52,8 @@ sakai-calendar-util - commons-lang - commons-lang + org.apache.commons + commons-lang3 ${project.groupId} diff --git a/calendar/calendar-impl/impl/src/java/org/sakaiproject/calendar/impl/BaseCalendarService.java b/calendar/calendar-impl/impl/src/java/org/sakaiproject/calendar/impl/BaseCalendarService.java index d2b0666f01ed..80e8c089aac6 100644 --- a/calendar/calendar-impl/impl/src/java/org/sakaiproject/calendar/impl/BaseCalendarService.java +++ b/calendar/calendar-impl/impl/src/java/org/sakaiproject/calendar/impl/BaseCalendarService.java @@ -45,7 +45,7 @@ import net.fortuna.ical4j.model.parameter.Value; import net.fortuna.ical4j.model.property.*; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.w3c.dom.Document; import org.w3c.dom.Element; diff --git a/calendar/calendar-summary-tool/tool/pom.xml b/calendar/calendar-summary-tool/tool/pom.xml index ebc9068f2490..7c51d3aff4ae 100644 --- a/calendar/calendar-summary-tool/tool/pom.xml +++ b/calendar/calendar-summary-tool/tool/pom.xml @@ -84,8 +84,8 @@ pom - commons-lang - commons-lang + org.apache.commons + commons-lang3 commons-digester diff --git a/calendar/calendar-summary-tool/tool/src/java/org/sakaiproject/tool/summarycalendar/ui/CalendarBean.java b/calendar/calendar-summary-tool/tool/src/java/org/sakaiproject/tool/summarycalendar/ui/CalendarBean.java index 8fcc37bc5c7c..0c5345fc514a 100644 --- a/calendar/calendar-summary-tool/tool/src/java/org/sakaiproject/tool/summarycalendar/ui/CalendarBean.java +++ b/calendar/calendar-summary-tool/tool/src/java/org/sakaiproject/tool/summarycalendar/ui/CalendarBean.java @@ -40,7 +40,7 @@ import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.sakaiproject.authz.api.SecurityService; diff --git a/calendar/calendar-tool/tool/pom.xml b/calendar/calendar-tool/tool/pom.xml index 1a507ab5a3dd..cf62b86f92a7 100644 --- a/calendar/calendar-tool/tool/pom.xml +++ b/calendar/calendar-tool/tool/pom.xml @@ -72,6 +72,10 @@ org.springframework spring-beans + + org.apache.commons + commons-lang3 + diff --git a/calendar/calendar-tool/tool/src/java/org/sakaiproject/calendar/entityproviders/CalendarEventEntityProvider.java b/calendar/calendar-tool/tool/src/java/org/sakaiproject/calendar/entityproviders/CalendarEventEntityProvider.java index b2bfd042942a..5c686906e1b1 100644 --- a/calendar/calendar-tool/tool/src/java/org/sakaiproject/calendar/entityproviders/CalendarEventEntityProvider.java +++ b/calendar/calendar-tool/tool/src/java/org/sakaiproject/calendar/entityproviders/CalendarEventEntityProvider.java @@ -17,8 +17,8 @@ import java.util.*; -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.sakaiproject.calendar.api.Calendar; import org.sakaiproject.calendar.api.CalendarEvent; import org.sakaiproject.calendar.api.CalendarEventVector; diff --git a/calendar/calendar-tool/tool/src/java/org/sakaiproject/calendar/tool/CalendarAction.java b/calendar/calendar-tool/tool/src/java/org/sakaiproject/calendar/tool/CalendarAction.java index 9c95156216ec..6e952c199b0f 100644 --- a/calendar/calendar-tool/tool/src/java/org/sakaiproject/calendar/tool/CalendarAction.java +++ b/calendar/calendar-tool/tool/src/java/org/sakaiproject/calendar/tool/CalendarAction.java @@ -47,7 +47,7 @@ import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.sakaiproject.alias.api.Alias; import org.sakaiproject.alias.api.AliasService; diff --git a/chat/chat-impl/impl/pom.xml b/chat/chat-impl/impl/pom.xml index 978ab6232fef..85bd3a1a0227 100644 --- a/chat/chat-impl/impl/pom.xml +++ b/chat/chat-impl/impl/pom.xml @@ -83,8 +83,8 @@ guava - commons-lang - commons-lang + org.apache.commons + commons-lang3 diff --git a/chat/chat-impl/impl/src/java/org/sakaiproject/chat2/model/impl/ChatManagerImpl.java b/chat/chat-impl/impl/src/java/org/sakaiproject/chat2/model/impl/ChatManagerImpl.java index 2493b244a922..4153e74ca8d4 100644 --- a/chat/chat-impl/impl/src/java/org/sakaiproject/chat2/model/impl/ChatManagerImpl.java +++ b/chat/chat-impl/impl/src/java/org/sakaiproject/chat2/model/impl/ChatManagerImpl.java @@ -50,8 +50,8 @@ import lombok.Setter; import lombok.extern.slf4j.Slf4j; -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.hibernate.Criteria; import org.hibernate.Query; diff --git a/chat/chat-impl/impl/src/java/org/sakaiproject/chat2/model/impl/ChatMessageEntityProvider.java b/chat/chat-impl/impl/src/java/org/sakaiproject/chat2/model/impl/ChatMessageEntityProvider.java index 971a770829db..b1819bf60731 100644 --- a/chat/chat-impl/impl/src/java/org/sakaiproject/chat2/model/impl/ChatMessageEntityProvider.java +++ b/chat/chat-impl/impl/src/java/org/sakaiproject/chat2/model/impl/ChatMessageEntityProvider.java @@ -27,7 +27,7 @@ import lombok.Setter; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.sakaiproject.chat2.model.ChatChannel; import org.sakaiproject.chat2.model.ChatManager; diff --git a/chat/chat-tool/tool/pom.xml b/chat/chat-tool/tool/pom.xml index 4485842f5836..d479f08252f4 100644 --- a/chat/chat-tool/tool/pom.xml +++ b/chat/chat-tool/tool/pom.xml @@ -92,8 +92,8 @@ commons-beanutils - commons-lang - commons-lang + org.apache.commons + commons-lang3 diff --git a/chat/chat-tool/tool/src/java/org/sakaiproject/chat2/tool/ChatTool.java b/chat/chat-tool/tool/src/java/org/sakaiproject/chat2/tool/ChatTool.java index 805d9ffaf7e9..74b4d1ab4b19 100644 --- a/chat/chat-tool/tool/src/java/org/sakaiproject/chat2/tool/ChatTool.java +++ b/chat/chat-tool/tool/src/java/org/sakaiproject/chat2/tool/ChatTool.java @@ -48,7 +48,7 @@ import lombok.Setter; import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.sakaiproject.authz.api.PermissionsHelper; import org.sakaiproject.chat2.model.ChatMessage; diff --git a/chat/chat-tool/tool/src/java/org/sakaiproject/chat2/tool/DecoratedChatChannel.java b/chat/chat-tool/tool/src/java/org/sakaiproject/chat2/tool/DecoratedChatChannel.java index c56e132c6e36..945571173b32 100644 --- a/chat/chat-tool/tool/src/java/org/sakaiproject/chat2/tool/DecoratedChatChannel.java +++ b/chat/chat-tool/tool/src/java/org/sakaiproject/chat2/tool/DecoratedChatChannel.java @@ -24,7 +24,7 @@ import java.util.Calendar; import java.util.Date; -import org.apache.commons.lang.time.DateUtils; +import org.apache.commons.lang3.time.DateUtils; import org.sakaiproject.chat2.model.ChatChannel; public class DecoratedChatChannel { diff --git a/citations/citations-impl/impl/pom.xml b/citations/citations-impl/impl/pom.xml index 7a63880a8741..3b1d11c73f6b 100644 --- a/citations/citations-impl/impl/pom.xml +++ b/citations/citations-impl/impl/pom.xml @@ -61,8 +61,8 @@ OkiOSID - commons-lang - commons-lang + org.apache.commons + commons-lang3 org.sakaiproject.velocity diff --git a/citations/citations-impl/impl/src/java/org/sakaiproject/citation/impl/BaseCitationService.java b/citations/citations-impl/impl/src/java/org/sakaiproject/citation/impl/BaseCitationService.java index ca8a633d5c54..818c6afe15d9 100644 --- a/citations/citations-impl/impl/src/java/org/sakaiproject/citation/impl/BaseCitationService.java +++ b/citations/citations-impl/impl/src/java/org/sakaiproject/citation/impl/BaseCitationService.java @@ -30,7 +30,7 @@ import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.osid.repository.Asset; import org.osid.repository.Part; diff --git a/citations/citations-impl/impl/src/java/org/sakaiproject/citation/impl/NestedCitationValidator.java b/citations/citations-impl/impl/src/java/org/sakaiproject/citation/impl/NestedCitationValidator.java index d2a69e73bcd2..ed15a75d38fe 100644 --- a/citations/citations-impl/impl/src/java/org/sakaiproject/citation/impl/NestedCitationValidator.java +++ b/citations/citations-impl/impl/src/java/org/sakaiproject/citation/impl/NestedCitationValidator.java @@ -15,12 +15,15 @@ */ package org.sakaiproject.citation.impl; -import org.apache.commons.lang.*; -import org.sakaiproject.citation.api.*; - import java.util.Arrays; import java.util.List; -import org.sakaiproject.component.cover.*; + +import org.apache.commons.lang3.StringUtils; +import org.sakaiproject.citation.api.CitationCollection; +import org.sakaiproject.citation.api.CitationCollectionOrder; +import org.sakaiproject.citation.api.CitationService; +import org.sakaiproject.citation.api.CitationValidator; +import org.sakaiproject.component.cover.ComponentManager; /** * Created by nickwilson on 9/29/15. diff --git a/common/archive-impl/impl2/pom.xml b/common/archive-impl/impl2/pom.xml index 40273163c6a3..fa0649dc2d7a 100644 --- a/common/archive-impl/impl2/pom.xml +++ b/common/archive-impl/impl2/pom.xml @@ -49,8 +49,8 @@ commons-io - commons-lang - commons-lang + org.apache.commons + commons-lang3 diff --git a/common/archive-impl/impl2/src/java/org/sakaiproject/archive/impl/ArchiveService2Impl.java b/common/archive-impl/impl2/src/java/org/sakaiproject/archive/impl/ArchiveService2Impl.java index 293c340a770a..52695e3328bb 100644 --- a/common/archive-impl/impl2/src/java/org/sakaiproject/archive/impl/ArchiveService2Impl.java +++ b/common/archive-impl/impl2/src/java/org/sakaiproject/archive/impl/ArchiveService2Impl.java @@ -24,7 +24,7 @@ import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.FileUtils; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.sakaiproject.archive.api.ArchiveService; import org.sakaiproject.component.api.ServerConfigurationService; diff --git a/common/common-composite-component/pom.xml b/common/common-composite-component/pom.xml index 497cc4000087..d48a44c48867 100644 --- a/common/common-composite-component/pom.xml +++ b/common/common-composite-component/pom.xml @@ -66,12 +66,10 @@ commons-beanutils - commons-lang - commons-lang - provided - - - + org.apache.commons + commons-lang3 + provided + diff --git a/common/common-composite-component/src/java/org/sakaiproject/component/common/edu/person/SakaiPersonManagerImpl.java b/common/common-composite-component/src/java/org/sakaiproject/component/common/edu/person/SakaiPersonManagerImpl.java index 0283a4fec31a..3dd418ca38e4 100644 --- a/common/common-composite-component/src/java/org/sakaiproject/component/common/edu/person/SakaiPersonManagerImpl.java +++ b/common/common-composite-component/src/java/org/sakaiproject/component/common/edu/person/SakaiPersonManagerImpl.java @@ -31,7 +31,7 @@ import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import org.hibernate.Criteria; import org.hibernate.HibernateException; import org.hibernate.Query; diff --git a/commons/api/pom.xml b/commons/api/pom.xml index 23981f54dc2d..6fed15a650dc 100644 --- a/commons/api/pom.xml +++ b/commons/api/pom.xml @@ -45,8 +45,8 @@ commons-fileupload - commons-lang - commons-lang + org.apache.commons + commons-lang3 org.projectlombok diff --git a/commons/api/src/java/org/sakaiproject/commons/api/datamodel/Comment.java b/commons/api/src/java/org/sakaiproject/commons/api/datamodel/Comment.java index 542641ca7557..cd2e795dfcd0 100644 --- a/commons/api/src/java/org/sakaiproject/commons/api/datamodel/Comment.java +++ b/commons/api/src/java/org/sakaiproject/commons/api/datamodel/Comment.java @@ -25,7 +25,7 @@ import java.sql.SQLException; import java.util.TimeZone; -import org.apache.commons.lang.StringEscapeUtils; +import org.apache.commons.lang3.StringEscapeUtils; import org.sakaiproject.commons.api.CommonsManager; import org.sakaiproject.entity.api.Entity; import org.sakaiproject.entity.api.ResourceProperties; @@ -104,7 +104,7 @@ public void setContent(String text, boolean modified) { modifiedDate = Instant.now().toEpochMilli(); } - this.content = StringEscapeUtils.unescapeHtml(text.trim()); + this.content = StringEscapeUtils.unescapeHtml3(text.trim()); } public void setCreatedDate(long createdDate) { diff --git a/commons/impl/pom.xml b/commons/impl/pom.xml index d5fe097ef971..48d5f928ef92 100644 --- a/commons/impl/pom.xml +++ b/commons/impl/pom.xml @@ -60,8 +60,8 @@ commons-fileupload - commons-lang - commons-lang + org.apache.commons + commons-lang3 junit diff --git a/commons/impl/src/java/org/sakaiproject/commons/impl/CommonsSecurityManagerImpl.java b/commons/impl/src/java/org/sakaiproject/commons/impl/CommonsSecurityManagerImpl.java index 89b2ff0c6b2b..45fe1b595b81 100644 --- a/commons/impl/src/java/org/sakaiproject/commons/impl/CommonsSecurityManagerImpl.java +++ b/commons/impl/src/java/org/sakaiproject/commons/impl/CommonsSecurityManagerImpl.java @@ -17,7 +17,7 @@ package org.sakaiproject.commons.impl; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang3.StringUtils; import java.time.Instant; import java.util.ArrayList; diff --git a/commons/tool/pom.xml b/commons/tool/pom.xml index f212ebd0dd0d..bbb6812bf643 100644 --- a/commons/tool/pom.xml +++ b/commons/tool/pom.xml @@ -61,8 +61,8 @@ commons-fileupload - commons-lang - commons-lang + org.apache.commons + commons-lang3 org.projectlombok diff --git a/commons/tool/src/java/org/sakaiproject/commons/tool/entityprovider/CommonsEntityProvider.java b/commons/tool/src/java/org/sakaiproject/commons/tool/entityprovider/CommonsEntityProvider.java index 4405e1005548..da8650b2578f 100644 --- a/commons/tool/src/java/org/sakaiproject/commons/tool/entityprovider/CommonsEntityProvider.java +++ b/commons/tool/src/java/org/sakaiproject/commons/tool/entityprovider/CommonsEntityProvider.java @@ -15,44 +15,53 @@ */ package org.sakaiproject.commons.tool.entityprovider; -import java.io.*; +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.IOException; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.OutputStreamWriter; import java.net.CookieHandler; import java.net.CookieManager; import java.net.CookiePolicy; -import java.net.MalformedURLException; import java.net.HttpURLConnection; +import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.Set; import javax.servlet.http.HttpServletResponse; import org.apache.commons.fileupload.FileItem; -import org.apache.commons.lang.StringEscapeUtils; -import org.apache.commons.lang.StringUtils; - -import org.sakaiproject.authz.api.PermissionsHelper; -import org.sakaiproject.commons.api.datamodel.Comment; -import org.sakaiproject.commons.api.datamodel.Post; -import org.sakaiproject.commons.api.datamodel.PostsData; +import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringUtils; import org.sakaiproject.commons.api.CommonsEvents; import org.sakaiproject.commons.api.CommonsManager; import org.sakaiproject.commons.api.CommonsSecurityManager; import org.sakaiproject.commons.api.PostReferenceFactory; import org.sakaiproject.commons.api.QueryBean; import org.sakaiproject.commons.api.SakaiProxy; +import org.sakaiproject.commons.api.datamodel.Comment; +import org.sakaiproject.commons.api.datamodel.Post; +import org.sakaiproject.commons.api.datamodel.PostsData; import org.sakaiproject.entitybroker.EntityReference; import org.sakaiproject.entitybroker.EntityView; import org.sakaiproject.entitybroker.entityprovider.annotations.EntityCustomAction; -import org.sakaiproject.entitybroker.entityprovider.capabilities.*; +import org.sakaiproject.entitybroker.entityprovider.capabilities.ActionsExecutable; +import org.sakaiproject.entitybroker.entityprovider.capabilities.AutoRegisterEntityProvider; +import org.sakaiproject.entitybroker.entityprovider.capabilities.Describeable; +import org.sakaiproject.entitybroker.entityprovider.capabilities.Outputable; +import org.sakaiproject.entitybroker.entityprovider.capabilities.ReferenceParseable; +import org.sakaiproject.entitybroker.entityprovider.capabilities.RequestAware; import org.sakaiproject.entitybroker.entityprovider.extension.ActionReturn; import org.sakaiproject.entitybroker.entityprovider.extension.Formats; import org.sakaiproject.entitybroker.entityprovider.extension.RequestGetter; import org.sakaiproject.entitybroker.exception.EntityException; import org.sakaiproject.entitybroker.util.AbstractEntityProvider; -import org.sakaiproject.site.api.Site; -import org.sakaiproject.site.api.ToolConfiguration; -import org.sakaiproject.tool.api.Session; import lombok.Setter; import lombok.extern.slf4j.Slf4j;