Skip to content
This repository was archived by the owner on May 9, 2022. It is now read-only.

Validation Response cannot be Deserialised when answer key is null #864

Open
jsharkey13 opened this issue Jun 27, 2017 · 0 comments
Open

Comments

@jsharkey13
Copy link
Member

If a question attempt inadvertantly gets saved with an answer key that is null ; it cannot be deserialised again afterwards and leads to a null pointer exception every time a user opens the menu on their account.

It would be nice if we could either deserialise correctly or silently skip the invalid attempt? I have prevented the invalid response from being persisted again - so this may be a 'wontfix' . . .

Caused by: java.lang.NullPointerException
	at uk.ac.cam.cl.dtg.segue.dao.users.QuestionValidationResponseDeserializer.deserialize(QuestionValidationResponseDeserializer.java:84)
	at uk.ac.cam.cl.dtg.segue.dao.users.QuestionValidationResponseDeserializer.deserialize(QuestionValidationResponseDeserializer.java:44)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3051)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2146)
	at uk.ac.cam.cl.dtg.segue.quiz.PgQuestionAttempts.getQuestionAttempts(PgQuestionAttempts.java:162)
	at uk.ac.cam.cl.dtg.segue.api.managers.QuestionManager.getQuestionAttemptsByUser(QuestionManager.java:317)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant