We must check for null when fetching signature production data from a DDocSignature, because SignatureProductionPlace element is OPTIONAL according to the XAdES specification.
Concrete use case where I have encountered this issue: opening a container from a DigiDoc file with a signature that had no location data. After getting the signature from this container and trying to get some signature production data (e.g. signature.getCity()) a NullPointerException was thrown.
We must check for
null
when fetching signature production data from aDDocSignature
, because SignatureProductionPlace element is OPTIONAL according to the XAdES specification.Concrete use case where I have encountered this issue: opening a container from a DigiDoc file with a signature that had no location data. After getting the signature from this container and trying to get some signature production data (e.g. signature.getCity()) a NullPointerException was thrown.