Author: sebb Date: Fri Aug 21 16:18:21 2009 New Revision: 806623 URL: http://svn.apache.org/viewvc?rev=806623&view=rev Log: Be more precise which classes are allowed
Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Daemon.java Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Daemon.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Daemon.java?rev=806623&r1=806622&r2=806623&view=diff ============================================================================== --- jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Daemon.java (original) +++ jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/Daemon.java Fri Aug 21 16:18:21 2009 @@ -63,7 +63,7 @@ * The proxy class which will be used to handle individual requests. This * class must be the {...@link Proxy} class or a subclass. */ - private final Class<?> proxyClass; + private final Class<? extends Proxy> proxyClass; /** * Create a new Daemon with the specified port and target. @@ -93,7 +93,7 @@ * class must be the {...@link Proxy} class or a subclass. * @throws IOException */ - public Daemon(int port, ProxyControl target, Class<?> proxyClass) throws IOException { + public Daemon(int port, ProxyControl target, Class<? extends Proxy> proxyClass) throws IOException { super("HTTP Proxy Daemon"); this.target = target; this.daemonPort = port; @@ -123,7 +123,7 @@ Socket clientSocket = mainSocket.accept(); if (running) { // Pass request to new proxy thread - Proxy thd = (Proxy) proxyClass.newInstance(); + Proxy thd = proxyClass.newInstance(); thd.configure(clientSocket, target, pageEncodings, formEncodings); thd.start(); } --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org