Skip to content

Commit

Permalink
The new parameter is now properly used
Browse files Browse the repository at this point in the history
  • Loading branch information
UO289845 committed Apr 18, 2024
1 parent 2f4e5d8 commit b5f6596
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ public AnswersAreEntitiesWithSubProperties(String propertyId, QuestionType type,

@Override
public String getRightAnswer(Map<String, List<Statement>> claims, String propertyId) throws Exception {
if(claims.get(super.getPropertyId())==null) {
throw new Exception("Claims does not have the property " + super.getPropertyId());
if(claims.get(propertyId)==null) {
throw new Exception("Claims does not have the property " + propertyId);
}

for(Statement st : claims.get(super.getPropertyId())) {
for(Statement st : claims.get(propertyId)) {
boolean valid = true;
for(SnakGroup sg : st.getQualifiers()) {
for(Snak s : sg.getSnaks()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ public AnswersAreEntitiesWithoutSubProperties(String propertyId, QuestionType ty

@Override
public String getRightAnswer(Map<String, List<Statement>> claims, String propertyId) throws Exception {
if(claims.get(super.getPropertyId())==null) {
throw new Exception("Claims does not have the property " + super.getPropertyId());
if(claims.get(propertyId)==null) {
throw new Exception("Claims does not have the property " + propertyId);
}

List<Statement> stms = claims.get(getPropertyId());
List<Statement> stms = claims.get(propertyId);
Statement stm = stms.get(stms.size()-1);
return processRightAnswer(stm);
}
Expand Down

0 comments on commit b5f6596

Please sign in to comment.