Joe H. was reading through the documentation of his company's custom-built Java framework and came across today's bizarre example. It would seem that the framework builders (who have since moved on) preferred to use the EmptyList in a number of places in lieu of an Empty List.
package initech.foundation.util; import java.util.AbstractList; public class EmptyList extends AbstractList { public EmptyList() { } public Object get(int index) { return null; } public int size() { return 0; } }
[Advertisement]
BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!