if (slashPos < 0)
try
    public Object convertFromString(String textRep, int sqlTypeCode) throws Exception    {        if (sqlTypeCode != Types.DATE)        {            return textRep;        }        else if (textRep != null)         {            // we're not using {@link java.sql.Date#valueOf(String)} as this method is too strict            // it only parses the full spec "yyyy-mm-dd"            String dateAsText = textRep;            int    year       = 1970;            int    month      = 1;            int    day        = 1;            int    slashPos   = dateAsText.indexOf('-');            if (slashPos < 0)            {                year = Integer.parseInt(dateAsText);            }            else            {                year       = Integer.parseInt(dateAsText.substring(0, slashPos));                dateAsText = dateAsText.substring(slashPos + 1);                slashPos   = dateAsText.indexOf('-');                if (slashPos < 0)                {                    month = Integer.parseInt(dateAsText);                }                else                {                    month = Integer.parseInt(dateAsText.substring(0, slashPos));                    day   = Integer.parseInt(dateAsText.substring(slashPos + 1));                }            }            return new Date(year - 1900, month - 1, day);                    }        else        {            return null;        }    }