Skip to content

Commit

Permalink
SAK-41858 - Change deleteWhitespace method by strip, as deleteWhitesp…
Browse files Browse the repository at this point in the history
…ace also deletes newline characters. (sakaiproject#6981)
  • Loading branch information
danielmerino authored and Miguel Pellicer committed Jun 4, 2019
1 parent 10a4326 commit ea4d4e5
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.deleteWhitespace(assessmentSettings.getIpAddresses());
String ipString = StringUtils.strip(assessmentSettings.getIpAddresses()," ");
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.deleteWhitespace(assessmentSettings.getIpAddresses());
String ipAddresses = StringUtils.strip(assessmentSettings.getIpAddresses()," ");
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.deleteWhitespace(assessmentSettings.getIpAddresses());
String ipString = StringUtils.strip(assessmentSettings.getIpAddresses()," ");
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.deleteWhitespace(assessmentSettings.getIpAddresses());
String ipAddresses = StringUtils.strip(assessmentSettings.getIpAddresses()," ");
if (ipAddresses == null)
ipAddresses = "";

Expand Down

0 comments on commit ea4d4e5

Please sign in to comment.