Skip to content

Commit

Permalink
SAK-41630 pasystem, announcement, Podcast, postem: commons-lang => co…
Browse files Browse the repository at this point in the history
…mmons-lang3 (sakaiproject#6750)
  • Loading branch information
axxter99 authored Apr 5, 2019
1 parent 87d69fb commit 2b863dc
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import java.util.Iterator;
import java.util.List;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.sakaiproject.announcement.api.AnnouncementMessage;
import org.sakaiproject.announcement.api.AnnouncementMessageEdit;
import org.sakaiproject.announcement.api.AnnouncementMessageHeader;
Expand Down
4 changes: 2 additions & 2 deletions announcement/announcement-tool/tool/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@
<artifactId>sakai-velocity-tool</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

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.sakaiproject.announcement.api.AnnouncementChannel;
import org.sakaiproject.announcement.api.AnnouncementMessage;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

import lombok.extern.slf4j.Slf4j;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import java.util.Set;
import java.util.Vector;

import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.sakaiproject.announcement.api.AnnouncementMessageEdit;
import org.sakaiproject.cheftool.ControllerState;
import org.sakaiproject.entity.cover.EntityManager;
Expand Down
4 changes: 0 additions & 4 deletions pasystem/pasystem-impl/impl/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@
<artifactId>commons-lang3</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
<dependency>
<groupId>org.sakaiproject.entitybroker</groupId>
<artifactId>entitybroker-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,8 @@
import java.util.Map;
import java.util.TimeZone;

import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.json.simple.JSONObject;

import org.sakaiproject.component.cover.ComponentManager;
import org.sakaiproject.entitybroker.DeveloperHelperService;
import org.sakaiproject.entitybroker.EntityView;
Expand All @@ -43,8 +41,8 @@
import org.sakaiproject.entitybroker.entityprovider.capabilities.Describeable;
import org.sakaiproject.entitybroker.entityprovider.capabilities.Outputable;
import org.sakaiproject.entitybroker.entityprovider.extension.Formats;
import org.sakaiproject.pasystem.api.Acknowledger;
import org.sakaiproject.pasystem.api.AcknowledgementType;
import org.sakaiproject.pasystem.api.Acknowledger;
import org.sakaiproject.pasystem.api.PASystem;
import org.sakaiproject.site.api.Site;
import org.sakaiproject.site.api.ToolConfiguration;
Expand All @@ -54,6 +52,8 @@
import org.sakaiproject.user.api.User;
import org.sakaiproject.user.cover.UserDirectoryService;

import lombok.extern.slf4j.Slf4j;

/**
* Web services supporting AJAX requests from the PA System end user display.
*/
Expand Down
4 changes: 2 additions & 2 deletions podcasts/podcasts-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
import java.util.ArrayList;
import java.util.List;

import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.sakaiproject.api.app.podcasts.PodcastService;
import org.sakaiproject.content.api.ContentResource;
import org.sakaiproject.entity.api.ResourceProperties;
Expand All @@ -42,6 +39,10 @@
import org.sakaiproject.site.api.ToolConfiguration;
import org.sakaiproject.tool.api.ToolManager;

import lombok.Getter;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;

/**
* Entity provider for the Podcast tool
*/
Expand Down
4 changes: 4 additions & 0 deletions postem/postem-app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import javax.faces.context.FacesContext;

import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.myfaces.shared_impl.util.MessageUtils;

import org.sakaiproject.api.app.postem.data.Gradebook;
Expand Down Expand Up @@ -281,7 +281,7 @@ public String getCurrentStudentGrades() {
}
if (currentStudent == null) {
return "<p>" + msgs.getFormattedMessage("no_grades_for_user",
new Object[]{StringEscapeUtils.escapeHtml(currentGradebook.getTitle())}) + "</p>";
new Object[]{StringEscapeUtils.escapeHtml3(currentGradebook.getTitle())}) + "</p>";
}
return currentStudent.formatGrades();

Expand All @@ -294,7 +294,7 @@ public String getFirstStudentGrades() {
Set students = currentGradebook.getStudents();
if (students.size() == 0) {
return "<p>" + msgs.getFormattedMessage("no_grades_in_gradebook",
new Object[]{StringEscapeUtils.escapeHtml(currentGradebook.getTitle())}) + "</p>";
new Object[]{StringEscapeUtils.escapeHtml3(currentGradebook.getTitle())}) + "</p>";
}
if (currentGradebook.getFirstUploadedUsername() != null) {
StudentGrades student = currentGradebook.studentGrades(currentGradebook.getFirstUploadedUsername());
Expand All @@ -312,7 +312,7 @@ public String getSelectedStudentGrades() {

if (currentGradebook.getUsernames() == null || currentGradebook.getUsernames().isEmpty()) {
return "<p>" + msgs.getFormattedMessage("no_grades_in_gradebook",
new Object[]{StringEscapeUtils.escapeHtml(currentGradebook.getTitle())}) + "</p>";
new Object[]{StringEscapeUtils.escapeHtml3(currentGradebook.getTitle())}) + "</p>";
}

if (selectedStudent == null || selectedStudent.equals("")) {
Expand Down
4 changes: 2 additions & 2 deletions postem/postem-hbm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
</dependency>
<!--org.sakaiprojectsakai-user-api${sakai.version}-->
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
</dependency>
</dependencies>
<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@
import java.util.TreeMap;
import java.util.TreeSet;

import org.apache.commons.lang.StringEscapeUtils;
//import org.apache.commons.math.stat.descriptive.SummaryStatistics;
import org.apache.commons.lang3.StringEscapeUtils;
import org.sakaiproject.api.app.postem.data.Gradebook;
import org.sakaiproject.api.app.postem.data.StudentGrades;
import org.sakaiproject.api.app.postem.data.Template;

import org.sakaiproject.user.api.UserNotDefinedException;
import org.sakaiproject.user.cover.UserDirectoryService;

Expand Down Expand Up @@ -330,7 +328,7 @@ public String getHeadingsRow() {
headingBuffer.append(";' >");
headingBuffer.append(current);
headingBuffer.append("</th>");*/
headingBuffer.append("<th style=\"padding: 0.6em;\" scope=\"col\">" + StringEscapeUtils.escapeHtml(current) + "</th>");
headingBuffer.append("<th style=\"padding: 0.6em;\" scope=\"col\">" + StringEscapeUtils.escapeHtml3(current) + "</th>");
ii++;
}
/*StringBuilder newBuffer = new StringBuilder();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import java.util.Iterator;
import java.util.List;

import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang3.StringEscapeUtils;
import org.sakaiproject.api.app.postem.data.Gradebook;
import org.sakaiproject.api.app.postem.data.StudentGrades;
import org.sakaiproject.api.app.postem.data.Template;
Expand Down Expand Up @@ -168,28 +168,28 @@ public String formatGrades() {
gradeBuffer.append("<table class=\"itemSummary\">");

if (h2.size() != 0) {
gradeBuffer.append("<tr><th scope=\"row\">" + StringEscapeUtils.escapeHtml(h2.get(0).toString()) + "</th><td>");
gradeBuffer.append("<tr><th scope=\"row\">" + StringEscapeUtils.escapeHtml3(h2.get(0).toString()) + "</th><td>");
h2.remove(0);
gradeBuffer.append(StringEscapeUtils.escapeHtml(getUsername()));
gradeBuffer.append(StringEscapeUtils.escapeHtml3(getUsername()));
gradeBuffer.append("</td></tr>");
Iterator ii = h2.iterator();
Iterator jj = grades.iterator();

while (ii.hasNext()) {
gradeBuffer.append("<tr><th scope=\"row\">");
gradeBuffer.append(StringEscapeUtils.escapeHtml((String) ii.next()));
gradeBuffer.append(StringEscapeUtils.escapeHtml3((String) ii.next()));
gradeBuffer.append("</th><td>");
gradeBuffer.append(StringEscapeUtils.escapeHtml((String) jj.next()));
gradeBuffer.append(StringEscapeUtils.escapeHtml3((String) jj.next()));
gradeBuffer.append("</td></tr>");
}
} else {
gradeBuffer.append("<tr><td>");
gradeBuffer.append(StringEscapeUtils.escapeHtml(getUsername()));
gradeBuffer.append(StringEscapeUtils.escapeHtml3(getUsername()));
gradeBuffer.append("</td></tr>");
Iterator jj = grades.iterator();
while (jj.hasNext()) {
gradeBuffer.append("<tr><td>");
gradeBuffer.append(StringEscapeUtils.escapeHtml((String) jj.next()));
gradeBuffer.append(StringEscapeUtils.escapeHtml3((String) jj.next()));
gradeBuffer.append("</td></tr>");
}
}
Expand Down Expand Up @@ -220,7 +220,7 @@ public String getGradesRow() {
gradeBuffer.append(width);
gradeBuffer.append(";' >");*/
gradeBuffer.append("<td style=\"padding:0.6em;\">");
gradeBuffer.append(StringEscapeUtils.escapeHtml(current));
gradeBuffer.append(StringEscapeUtils.escapeHtml3(current));
gradeBuffer.append("</td>");
ii++;
}
Expand Down

0 comments on commit 2b863dc

Please sign in to comment.