Try more specific constructors first in PerSession.
authorFredrik Tolf <fredrik@dolda2000.com>
Mon, 26 Oct 2009 17:20:29 +0000 (18:20 +0100)
committerFredrik Tolf <fredrik@dolda2000.com>
Mon, 26 Oct 2009 17:20:29 +0000 (18:20 +0100)
src/dolda/jsvc/util/PerSession.java

index 7973e0a..1cbc0d7 100644 (file)
@@ -19,11 +19,11 @@ public class PerSession implements Responder {
     private Object makedata(Session sess) {
        try {
            try {
-               return(dcl.getConstructor().newInstance());
+               return(dcl.getConstructor(Session.class).newInstance(sess));
            } catch(NoSuchMethodException e) {
            }
            try {
-               return(dcl.getConstructor(Session.class).newInstance(sess));
+               return(dcl.getConstructor().newInstance());
            } catch(NoSuchMethodException e) {
            }
        } catch(InstantiationException e) {