For example SpdxAnnotationV2.Type can be REVIEW or OTHER and is just a string. When reading from a file, it's possible for the field to have leading or trailing whitespace that should be removed, especially in TagValue.
Fields that have multiple words in them (ex. SHA1: d6a770ba38583ed4bb4525bd96e50461655d2759 ) are processed by Regexes that look for and strip the extra whitespace already. These single word fields generally do not.
For example
SpdxAnnotationV2.Type
can be REVIEW or OTHER and is just a string. When reading from a file, it's possible for the field to have leading or trailing whitespace that should be removed, especially in TagValue.Fields that have multiple words in them (ex.
SHA1: d6a770ba38583ed4bb4525bd96e50461655d2759
) are processed by Regexes that look for and strip the extra whitespace already. These single word fields generally do not.Possibly this is a good candidate for a macro.