CodeSOD: isAlive |
Why are we here? What is the purpose of life? What does it even mean to be alive?
No, I havent been hanging out in coffee shops wearing a beret and discussing philosophy. Ive instead been puzzling over this code, from Nikolai K.
public boolean isAlive() {
try {
return true;
} catch (Exception var2) {
return false;
}
}
protected void finalize() throws Exception {
try {
if(this.isAlive()) {
;
}
} catch (Exception var2) {
System.err.println("Error occurred in finalize. Exception: " + var2);
throw new Exception(var2);
}
}
There are some deep philsophical questions here, but I dont think we can hope to extract any answers. This code begs for an explanation, but I cant give you one. I dont think the original author could either. The best Nikolai could give us was that this was in a CORBA wrapper object. Perhaps having to use CORBA drove the original developer mad? Or perhaps the original developer has a wisdom that only the mad can access?
When will isAlive return false?
[Advertisement] Manage IT infrastructure as code across all environments with Puppet. Puppet Enterprise now offers more control and insight, with role-based access control, activity logging and all-new Puppet Apps. Start your free trial today!
| Комментировать | « Пред. запись — К дневнику — След. запись » | Страницы: [1] [Новые] |