Skip to content

Commit

Permalink
SAK-41858 - Strip doesn't work, only strips from beginning and end of…
Browse files Browse the repository at this point in the history
… lines. Using replace. (sakaiproject#6992)
  • Loading branch information
danielmerino authored and Miguel Pellicer committed Jun 6, 2019
1 parent df28821 commit 078c312
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ else if (time instanceof java.lang.Boolean) {
error=true;
}
boolean ipErr=false;
String ipString = StringUtils.strip(assessmentSettings.getIpAddresses()," ");
String ipString = assessmentSettings.getIpAddresses().trim().replace(" ", "");
String[]arraysIp=(ipString.split("\n"));
for(int a=0;a<arraysIp.length;a++){
String currentString=arraysIp[a];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ public AssessmentFacade save(AssessmentSettingsBean assessmentSettings, boolean
// k. set ipAddresses

HashSet ipSet = new HashSet();
String ipAddresses = StringUtils.strip(assessmentSettings.getIpAddresses()," ");
String ipAddresses = assessmentSettings.getIpAddresses().replace(" ", "");
if (ipAddresses == null)
ipAddresses = "";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ public void processAction(ActionEvent ae) throws AbortProcessingException
error=true;
}

String ipString = StringUtils.strip(assessmentSettings.getIpAddresses()," ");
String ipString = assessmentSettings.getIpAddresses().trim().replace(" ", "");
String[]arraysIp=(ipString.split("\n"));
boolean ipErr=false;
for(int a=0;a<arraysIp.length;a++){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public void processAction(ActionEvent ae) throws AbortProcessingException
assessmentService.deleteAllSecuredIP(assessment);
// k. set ipAddresses
Set ipSet = new HashSet();
String ipAddresses = StringUtils.strip(assessmentSettings.getIpAddresses()," ");
String ipAddresses = assessmentSettings.getIpAddresses().replace(" ", "");
if (ipAddresses == null)
ipAddresses = "";

Expand Down

0 comments on commit 078c312

Please sign in to comment.