missioncommand / mil-sym-java

(RETIRED) MIL-STD-2525 B and C rendering library and web service
Apache License 2.0
67 stars 36 forks source link

additional null check for the Higher Formation modifier #90

Closed matthewlevan closed 6 years ago

matthewlevan commented 6 years ago

When rendering a unit (eg, SHGPUCF---EETUG) where there is a CC_COUNTRY_CODE and the unit can have a M_HIGHER_FORMATION modifier but does not, mValue gets set to null and then causes a NullPointerException when trying to compare it to the empty string.

There are a half dozen different ways to code this fix, I went with minimally disruptive. If you have a different stylistic preference I'm happy to amend!

michael-spinelli commented 6 years ago

Looks good to me. Thanks!