Hello, Attached is a tiny patch to fred just to fix some constructor permissions in freenet.transport.tcpAddress. I've been writing some test code to use the FCP classes in fred as a basis for possibly writing a new application, and in order to use them I need to be able to create tcpAddress objects. This patch makes that possible by making the object's constructors public instead of private. (Created with "cvs diff -u")
I would greatly appreciate it if someone could check this patch in after looking it over so others can use the freenet.jar that comes with nodes as an FCP library. Any comments or suggestions are also welcome. -- David Allen http://opop.nols.com/ -------------- next part -------------- Index: src/freenet/transport/tcpAddress.java =================================================================== RCS file: /cvsroot/freenet/freenet/src/freenet/transport/tcpAddress.java,v retrieving revision 1.4 diff -u -r1.4 tcpAddress.java --- src/freenet/transport/tcpAddress.java 15 Jul 2002 01:31:22 -0000 1.4 +++ src/freenet/transport/tcpAddress.java 6 Aug 2002 00:21:37 -0000 @@ -37,7 +37,7 @@ private final tcpTransport transport; - private tcpAddress(tcpTransport transport) { + public tcpAddress(tcpTransport transport) { super(transport); this.transport = transport; } @@ -45,8 +45,8 @@ /** * Creates an address from an InetAddress object and port number. */ - tcpAddress(tcpTransport transport, InetAddress host, int port) - throws BadAddressException { + public tcpAddress(tcpTransport transport, InetAddress host, int port) + throws BadAddressException { this(transport); setPort(port); this.host = host; @@ -56,8 +56,8 @@ /** * Creates an address from a host name or IP string and port number. */ - tcpAddress(tcpTransport transport, String hostname, int port) - throws BadAddressException { + public tcpAddress(tcpTransport transport, String hostname, int port) + throws BadAddressException { this(transport); setPort(port); try { @@ -74,7 +74,8 @@ * where a,b,c,d are the (decimal) octets of the IPv4 address * and p is the (decimal) port number. */ - tcpAddress(tcpTransport transport, String str) throws BadAddressException { + public tcpAddress(tcpTransport transport, String str) + throws BadAddressException { this(transport); int colon = str.indexOf(':'); if (colon == -1) {
