try // do sanity check
{
// if (RDN==null || "".equals(RDN)) return;
if (rdnText==null || "".equals(rdnText)) //TE: empty RDN.
throw new InvalidNameException(CBIntText.get("Empty RDN, please enter a valid RDN.") + " " + ((rdnText==null)?"<null>":CBIntText.get("The RDN value entered was: '")+rdnText) + "'");
if (NameUtility.next(rdnText,0,'=')<0) //TE: no '='.
throw new InvalidNameException(CBIntText.get("Invalid RDN, please enter a naming attribute followed by '=' followed by a name in the RDN field (for example, 'cn=Trudi). '") + ((rdnText==null)?"<null>":CBIntText.get("The RDN value entered was: '")+rdnText) + "'");
else if (NameUtility.next(rdnText,0,'=')<1) //TE: no naming attribute.
throw new InvalidNameException(CBIntText.get("Invalid RDN, please enter a naming attribute in the RDN field (for example, cn: 'cn=Trudi). '") + ((rdnText==null)?"<null>":CBIntText.get("The RDN value entered was: '")+rdnText) + "'");
}
catch (InvalidNameException ine)
{
CBUtility.warning(this, CBIntText.get("Please Fill in the RDN field with a valid RDN."), CBIntText.get("Invalid RDN"));
log.log(Level.WARNING, "Invalid RDN value in the New Entry dialog: ", ine);