You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
idtag in stoptransaction is optional , so ModelUtil.validate() will check string != null . If it is null, it will return false.
When ModelUtil.validate() returns false, then idTag.length() crashes. How many more cases of this could there be?
/** * Optional. This contains the identifier which requested to stop the charging. It is optional * because a Charge Point may terminate charging without the presence of an idTag, e.g. in case of * a reset. A Charge Point SHALL send the idTag if known. * * @param idTag a String with max length 20 */@XmlElementpublicvoidsetIdTag(StringidTag) {
if (!ModelUtil.validate(idTag, 20)) {
thrownewPropertyConstraintException(idTag.length(), "Exceeded limit of 20 chars");
}
this.idTag = idTag;
}
My proposal is to add if idTag != null && in the check:
if (idTag != null && !ModelUtil.validate(idTag, 20)) { ...
The text was updated successfully, but these errors were encountered:
mmauksch
added a commit
to mmauksch/Java-OCA-OCPP
that referenced
this issue
Aug 17, 2023
idtag in stoptransaction is optional , so ModelUtil.validate() will check string != null . If it is null, it will return false.
When ModelUtil.validate() returns false, then idTag.length() crashes. How many more cases of this could there be?
My proposal is to add if idTag != null && in the check:
The text was updated successfully, but these errors were encountered: