Week ago I wrote about unusual way of handling exceptions in Filenet Workplace.
Today I found another "gem":
[java] try { invokeNamedEvent(eventName, uiModule, request, new WcmEventResponse(response, this, okToRedirect));
// If a non-null return value was returned from the invoke, check for true/false. If the // result matches "false", set the redirect flag to true indicating to cancel processing // of the page. Object result = request.getAttribute(INVOKE_RETURN_VALUE); if ( result != null result.toString().equals(String.valueOf(false)) ) sendRedirectCalled = true; } catch (Exception e) { throw e; }
[/java]
Why to catch an exception here? And why string comparison is used when Boolean has a constructor with the String parameter?
It seems that Filenet doesn't use any of code review procedures internally. Developers just hack the code all day, make no comments and only two of them really understand the whole Filenet Workplace system. Or it was written long time ago by developer, which left the company, and nobody has time and/or will to do a proper system.
Technorati Tags: filenet, source, exceptions