Adding proper certificate exception handling when validation fails is probably a large job, this is why this feature gets postponed. Is that correct?
As an intermediate step maybe the validation can still be done and the validation error shown, then proceed as usual regardless. But at least you are warned that validation failed.
Please make sure that the hostname is also validated, AFAIK this is not done by default and must be done explicitly in JNDI, at least for LDAPS, not sure about StartTLS.
See this thread for some details: