This is the piece of code.
private boolean CheckTerm()
{
String str = lGskCompoundNumber;
if (lPrefix.trim() == "" || lNumber.trim() == "")
return false;
try
{
Integer.parseInt(lNumber);
}
catch (Exception ex)
{
return false;
}
if (lHasAmpersand)
str = lGskCompoundNumber.replace("&", "");
return str.equals(lPrefix + lInitSep + lNumber + lEndSep + lSuffix);
}
Should I return a certain value from catch block or is the usage right?