DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18347>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18347 [VELTOOLS][PATCH] Avoid dummy tools creation in ViewToolInfo constructor ------- Additional Comments From [EMAIL PROTECTED] 2003-04-01 12:05 ------- > Your proposed change would fail to check whether or not the class > implementing has a working public constructor with no args. You're right... I was only considering ViewTools, my mistake. > Is there some strong reason you have for avoiding the creation > of these "dummy" instances during startup? Nothing personal... ;-) But basically, tools are external entities we should be very carefull with. Consider the example of a MailTool or a DatabaseTool, i mean an application scoped tool connecting to something somewhere... the 'test' instanciation can have some undesirable side effects. Note than you can use java reflection to check for the presence of a default constructor : public static boolean hasDefaultConstructor(Class cls) { try { cls.getConstructor(new Class[] {}); } catch (Exception e) { return false; } return true; } If you don't think it's a concern, well, I guess this issue can be closed... CloD --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
