I came across this method in the JDK
From com.sun.org.apache.xml.internal.serializer.Version;
public static int getDevelopmentVersionNum()
{
try {
if ((new String("")).length() == 0)
return 0;
else
return Integer.parseInt("");
} catch (NumberFormatException nfe) {
return 0;
}
}
Is this doing anything more than return 0?
I feel like I am missing something. I can only assume this is generated code. 😉
It looks like this file is generated from the following
Version.srcfile by textual substitution. So, when@version.DEVELOPER@variable is empty, the code in question is generated.length()check is needed to return 0 in this case.