Skip to content

Commit

Permalink
🔧 chore(project): advance Struts version update
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristian45 committed Dec 19, 2024
1 parent 68b1bd0 commit c8c5522
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,16 +283,16 @@ public HashMap<String, Object> getElements() {
@Override
public void prepare() throws Exception {
// Map<String, Object> parameters = this.getParameters();
Map<String, Parameter> parameters = this.getParameters();
Map<String, Object> parameters = this.getParameters();

try {
// crpProgramID = Long.parseLong(StringUtils.trim(((String[]) parameters.get(APConstants.CENTER_PROGRAM_ID))[0]));
crpProgramID =
Long.parseLong(StringUtils.trim(parameters.get(APConstants.CRP_PROGRAM_ID).getMultipleValues()[0]));
crpProgramID = Long
.parseLong(StringUtils.trim(((Parameter) parameters.get(APConstants.CRP_PROGRAM_ID)).getMultipleValues()[0]));
} catch (Exception e) {
LOG.error("There was an exception trying to parse the crp program id = {} ",
// StringUtils.trim(((String[]) parameters.get(APConstants.CENTER_PROGRAM_ID))[0]));
StringUtils.trim(parameters.get(APConstants.CRP_PROGRAM_ID).getMultipleValues()[0]));
StringUtils.trim(((Parameter) parameters.get(APConstants.CRP_PROGRAM_ID)).getMultipleValues()[0]));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,9 @@ public String getSectionName() {
@Override
public void prepare() throws Exception {
// Map<String, Object> parameters = this.getParameters();
Map<String, Parameter> parameters = this.getParameters();
Map<String, Object> parameters = this.getParameters();
// sectionName = StringUtils.trim(((String[]) parameters.get(APConstants.SECTION_NAME))[0]);
sectionName = StringUtils.trim(parameters.get(APConstants.SECTION_NAME).getMultipleValues()[0]);
sectionName = StringUtils.trim(((Parameter) parameters.get(APConstants.SECTION_NAME)).getMultipleValues()[0]);
projectID = -1;

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,9 @@ public HashMap<String, Object> getJsonString() {

@Override
public void prepare() throws Exception {
Map<String, Parameter> parameters = this.getParameters();
socketID = StringUtils.trim(parameters.get("socket_id").getMultipleValues()[0]);
channel = StringUtils.trim(parameters.get("channel_name").getMultipleValues()[0]);
Map<String, Object> parameters = this.getParameters();
socketID = StringUtils.trim(((Parameter) parameters.get("socket_id")).getMultipleValues()[0]);
channel = StringUtils.trim(((Parameter) parameters.get("channel_name")).getMultipleValues()[0]);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionInvocation;
import com.opensymphony.xwork2.interceptor.AbstractInterceptor;
import org.apache.struts2.dispatcher.Parameter;

/**
* @author Hermes Jiménez - CIAT/CCAFS
Expand All @@ -44,7 +43,7 @@ public class EditPrivateStudyInterceptor extends AbstractInterceptor implements

private static final long serialVersionUID = 4178469256964398247L;

private Map<String, Parameter> parameters;
private Map<String, Object> parameters;
private Map<String, Object> session;
private GlobalUnit crp;
private long expectedId = 0;
Expand Down

0 comments on commit c8c5522

Please sign in to comment.