You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Niall Pemberton <ni...@gmail.com> on 2010/03/25 18:07:50 UTC
Re: svn commit: r926765 - /commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPSSocketFactory.java
I think the issue of compatibility for Net 2.1 should have been
discussed - but I'm surprised you arbitrarily decided to revert Rory's
changes and restore compatibility without any discussion of that
first. IMO its OK to dive into a component and make build/site
fixes/improvements or minor code fixes - but if you're not an
established Commons Net dev - then making functional/API changes
without any discussion seems wrong to me.
Niall
On Tue, Mar 23, 2010 at 8:20 PM, <se...@apache.org> wrote:
> Author: sebb
> Date: Tue Mar 23 20:20:41 2010
> New Revision: 926765
>
> URL: http://svn.apache.org/viewvc?rev=926765&view=rev
> Log:
> Restore backward compatibility (lost in r740961)
>
> Modified:
> commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPSSocketFactory.java
>
> Modified: commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPSSocketFactory.java
> URL: http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPSSocketFactory.java?rev=926765&r1=926764&r2=926765&view=diff
> ==============================================================================
> --- commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPSSocketFactory.java (original)
> +++ commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPSSocketFactory.java Tue Mar 23 20:20:41 2010
> @@ -19,11 +19,13 @@ package org.apache.commons.net.ftp;
>
> import java.io.IOException;
> import java.net.InetAddress;
> +import java.net.ServerSocket;
> import java.net.Socket;
> import java.net.UnknownHostException;
>
> import javax.net.SocketFactory;
> import javax.net.ssl.SSLContext;
> +import javax.net.ssl.SSLServerSocket;
>
> /**
> *
> @@ -58,4 +60,29 @@ public class FTPSSocketFactory extends S
> public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException {
> return this.context.getSocketFactory().createSocket(address, port, localAddress, localPort);
> }
> +
> + /** @deprecated use {@link FTPSServerSocketFactory#createServerSocket(int) instead} */
> + @Deprecated
> + public ServerSocket createServerSocket(int port) throws IOException {
> + return this.init(this.context.getServerSocketFactory().createServerSocket(port));
> + }
> +
> + /** @deprecated use {@link FTPSServerSocketFactory#createServerSocket(int, int) instead} */
> + @Deprecated
> + public ServerSocket createServerSocket(int port, int backlog) throws IOException {
> + return this.init(this.context.getServerSocketFactory().createServerSocket(port, backlog));
> + }
> +
> + /** @deprecated use {@link FTPSServerSocketFactory#createServerSocket(int, int, InetAddress) instead} */
> + @Deprecated
> + public ServerSocket createServerSocket(int port, int backlog, InetAddress ifAddress) throws IOException {
> + return this.init(this.context.getServerSocketFactory().createServerSocket(port, backlog, ifAddress));
> + }
> +
> + /** @deprecated use {@link FTPSServerSocketFactory#init(ServerSocket)} */
> + @Deprecated
> + public ServerSocket init(ServerSocket socket) throws IOException {
> + ((SSLServerSocket) socket).setUseClientMode(true);
> + return socket;
> + }
> }
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org
Re: svn commit: r926765 - /commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPSSocketFactory.java
Posted by sebb <se...@gmail.com>.
On 25/03/2010, Niall Pemberton <ni...@gmail.com> wrote:
> I think the issue of compatibility for Net 2.1 should have been
> discussed - but I'm surprised you arbitrarily decided to revert Rory's
> changes and restore compatibility without any discussion of that
> first.
I restored some deleted items to restore compatibility where it was
possible to do so without changing the new API. Perhaps I should have
signalled my intentions first, but it's easy enough to re-revert if
necessary.
> IMO its OK to dive into a component and make build/site
> fixes/improvements or minor code fixes - but if you're not an
> established Commons Net dev - then making functional/API changes
> without any discussion seems wrong to me.
I have done quite a lot of work on Net in the past; I spent a long
time fixing the date parsing for example, and IIRC I did some work on
the VMS-related code. So I do class myself as a Net dev (though I have
deliberately not added my name to the pom).
> Niall
>
> On Tue, Mar 23, 2010 at 8:20 PM, <se...@apache.org> wrote:
> > Author: sebb
> > Date: Tue Mar 23 20:20:41 2010
> > New Revision: 926765
> >
> > URL: http://svn.apache.org/viewvc?rev=926765&view=rev
> > Log:
> > Restore backward compatibility (lost in r740961)
> >
> > Modified:
> > commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPSSocketFactory.java
> >
> > Modified: commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPSSocketFactory.java
> > URL: http://svn.apache.org/viewvc/commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPSSocketFactory.java?rev=926765&r1=926764&r2=926765&view=diff
> > ==============================================================================
> > --- commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPSSocketFactory.java (original)
> > +++ commons/proper/net/branches/NET_2_0/src/main/java/org/apache/commons/net/ftp/FTPSSocketFactory.java Tue Mar 23 20:20:41 2010
> > @@ -19,11 +19,13 @@ package org.apache.commons.net.ftp;
> >
> > import java.io.IOException;
> > import java.net.InetAddress;
> > +import java.net.ServerSocket;
> > import java.net.Socket;
> > import java.net.UnknownHostException;
> >
> > import javax.net.SocketFactory;
> > import javax.net.ssl.SSLContext;
> > +import javax.net.ssl.SSLServerSocket;
> >
> > /**
> > *
> > @@ -58,4 +60,29 @@ public class FTPSSocketFactory extends S
> > public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException {
> > return this.context.getSocketFactory().createSocket(address, port, localAddress, localPort);
> > }
> > +
> > + /** @deprecated use {@link FTPSServerSocketFactory#createServerSocket(int) instead} */
> > + @Deprecated
> > + public ServerSocket createServerSocket(int port) throws IOException {
> > + return this.init(this.context.getServerSocketFactory().createServerSocket(port));
> > + }
> > +
> > + /** @deprecated use {@link FTPSServerSocketFactory#createServerSocket(int, int) instead} */
> > + @Deprecated
> > + public ServerSocket createServerSocket(int port, int backlog) throws IOException {
> > + return this.init(this.context.getServerSocketFactory().createServerSocket(port, backlog));
> > + }
> > +
> > + /** @deprecated use {@link FTPSServerSocketFactory#createServerSocket(int, int, InetAddress) instead} */
> > + @Deprecated
> > + public ServerSocket createServerSocket(int port, int backlog, InetAddress ifAddress) throws IOException {
> > + return this.init(this.context.getServerSocketFactory().createServerSocket(port, backlog, ifAddress));
> > + }
> > +
> > + /** @deprecated use {@link FTPSServerSocketFactory#init(ServerSocket)} */
> > + @Deprecated
> > + public ServerSocket init(ServerSocket socket) throws IOException {
> > + ((SSLServerSocket) socket).setUseClientMode(true);
> > + return socket;
> > + }
> > }
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
> For additional commands, e-mail: dev-help@commons.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org