Skip to content

Commit

Permalink
i273: rename method for clarity.
Browse files Browse the repository at this point in the history
  • Loading branch information
clevengr committed Jun 30, 2021
1 parent 2fa0058 commit 4f69e88
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ private void writeJudgementRecord(PrintWriter printWriter, Run run, JudgementRec

//if we found a judgement string, try to convert it to a corresponding CLICS acronym
if (result!=null && result.length()>0) {
CLICS_JUDGEMENT_ACRONYM acronym = CLICSJudgementType.getCLICSAcronym(result);
CLICS_JUDGEMENT_ACRONYM acronym = CLICSJudgementType.getCLICSAcronymFromDisplayText(result);
if (acronym!=null) {
result = acronym.name();
}
Expand Down
2 changes: 1 addition & 1 deletion src/edu/csus/ecs/pc2/core/util/JSONTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ public ObjectNode convertJudgementToJSON(Run submission) {
resultString = judgementRecord.getValidatorResultString();
if (resultString!=null) {
//try to convert the validator string to a known acronym
CLICS_JUDGEMENT_ACRONYM acronym = CLICSJudgementType.getCLICSAcronym(resultString);
CLICS_JUDGEMENT_ACRONYM acronym = CLICSJudgementType.getCLICSAcronymFromDisplayText(resultString);
//check if we got back a judgement acronym
if (acronym!=null) {
resultString = acronym.name();
Expand Down
12 changes: 10 additions & 2 deletions src/edu/csus/ecs/pc2/shadow/ShadowController.java
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ private Map<String, ShadowJudgementInfo> getJudgementsMap(Run[] pc2Runs) {
}

// try to convert the judgement string text to a corresponding acronym (returns null if judgementString is null or not found)
CLICS_JUDGEMENT_ACRONYM acronym = CLICSJudgementType.getCLICSAcronym(judgementString);
CLICS_JUDGEMENT_ACRONYM acronym = CLICSJudgementType.getCLICSAcronymFromDisplayText(judgementString);

if (acronym == null) {
// we couldn't find a CLICS judgement matching the string;
Expand All @@ -609,7 +609,7 @@ private Map<String, ShadowJudgementInfo> getJudgementsMap(Run[] pc2Runs) {
judgementString = judgementString.substring(5); // strip off the "No - "
}

acronym = CLICSJudgementType.getCLICSAcronym(judgementString);
acronym = CLICSJudgementType.getCLICSAcronymFromDisplayText(judgementString);

}

Expand Down Expand Up @@ -923,4 +923,12 @@ private boolean restartShadowIfNeeded(ContestInformation ci) {
}
return (result);
}

public IInternalContest getLocalContest() {
return localContest;
}

public IInternalController getLocalController() {
return localController;
}
}

0 comments on commit 4f69e88

Please sign in to comment.