From: Fredrik Tolf Date: Mon, 26 Oct 2009 17:20:29 +0000 (+0100) Subject: Try more specific constructors first in PerSession. X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=8eafb5c6ccc150d1a6d0991780a262e389d9e424;p=jsvc.git Try more specific constructors first in PerSession. --- diff --git a/src/dolda/jsvc/util/PerSession.java b/src/dolda/jsvc/util/PerSession.java index 7973e0a..1cbc0d7 100644 --- a/src/dolda/jsvc/util/PerSession.java +++ b/src/dolda/jsvc/util/PerSession.java @@ -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) {