I implemented a class in Java7. It does not inherit/implements anything. It uses Tess4J so I thought it would be nice to free the resources in the end. So I overrode the finalize() method like this:
@Override
protected void finalize() throws Throwable
{
try
{
TessAPI1.TessBaseAPIDelete(handle);
}
catch(Throwable t)
{
throw t;
}
finally
{
super.finalize();
}
}
Netbeans 8.0.2 gives me warning for this method:
finalize declared()
The description on Netbeans website is not more useful to me:
warns about implementation of Object.finalize()
I didn't overrode any other method like equals or anything (maybe I should?). Can you tell me why I get this warning?