Closed olly closed 1 year ago
In #182 it appears a Survey Station was erroneously renamed an included a \n newline character. This appears to have been guarded against in the Station constructors:
\n
https://github.com/richsmith/sexytopo/blob/ef7f19146425cfb7db78f1225a0bda1f51527b85/app/src/main/java/org/hwyl/sexytopo/model/survey/Station.java#L21-L28
but the renameStation method of SurveyUpdater calls setName, which doesn't utilise sanitiseName.
renameStation
SurveyUpdater
setName
sanitiseName
https://github.com/richsmith/sexytopo/blob/ef7f19146425cfb7db78f1225a0bda1f51527b85/app/src/main/java/org/hwyl/sexytopo/control/util/SurveyUpdater.java#L224-L231
This PR rectifies that by calling sanitiseName in the setter, ensuring the value is stored in its sanitised form.
In #182 it appears a Survey Station was erroneously renamed an included a
\n
newline character. This appears to have been guarded against in the Station constructors:https://github.com/richsmith/sexytopo/blob/ef7f19146425cfb7db78f1225a0bda1f51527b85/app/src/main/java/org/hwyl/sexytopo/model/survey/Station.java#L21-L28
but the
renameStation
method ofSurveyUpdater
callssetName
, which doesn't utilisesanitiseName
.https://github.com/richsmith/sexytopo/blob/ef7f19146425cfb7db78f1225a0bda1f51527b85/app/src/main/java/org/hwyl/sexytopo/control/util/SurveyUpdater.java#L224-L231
This PR rectifies that by calling
sanitiseName
in the setter, ensuring the value is stored in its sanitised form.