james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <n...@devtech.com>
Subject RE: DNSServer bug
Date Sat, 19 Nov 2005 22:26:06 GMT
Actually, there is a return statement, and it uses a really ugly
side-effect, as you can see from the following stripped down example:

import java.util.*;
import java.net.*;

public class test {

    public Collection f(String arg) {
	List servers = new ArrayList();
	try {
	    servers = new ArrayList();
	    return Collections.unmodifiableCollection(servers);
	}
	finally {
	    servers.add("finally");
	}
    }

    public test(String[] args) {
	System.out.println(f(args[0]));
    }

    public static void main(String[] args) {
	test t = new test(args);
    }
}

There is an extraneous "new ArrayList()" above, which is also present in the
live code, and that should be fixed.

	-- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message