bugfix ControllerFactory

"Eelco Hillenius" <[email protected]>
Newsgroups gmane.comp.web.maverick.general
Message-ID <[email protected]>
Hi,

In ControllerFactory this code:

	if (cls.isAssignableFrom(ControllerSingleton.class))

never has a useable result. Because of this, init(Element) is never called
for classes that implement ControllerSingleton.

A more useable variant is:

 	if (ControllerSingleton.class.isAssignableFrom(cls))

You can find a path attached.


Eelco Hillenius
patch.txt (text/plain, 615 B)
Index: ControllerFactory.java
===================================================================
RCS file: /cvsroot/mav/maverick/src/java/org/infohazard/maverick/flow/ControllerFactory.java,v
retrieving revision 1.7
diff -u -r1.7 ControllerFactory.java
--- ControllerFactory.java	6 Jun 2002 12:23:53 -0000	1.7
+++ ControllerFactory.java	11 Mar 2003 17:22:37 -0000
@@ -56,7 +56,7 @@
 		{
 			Class cls = Class.forName(className);
 
-			if (cls.isAssignableFrom(ControllerSingleton.class))
+			if (ControllerSingleton.class.isAssignableFrom(cls))
 			{
 				theController = (ControllerSingleton)cls.newInstance();
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.