I have a User that has a list of ShippingAddresses

public class User {
private int id;
private String firstName;
private String lastName;
private String userName;
private String emailAddress;
private BillingAddress billingAddress;
-->private List<ShippingAddress> shippingAddresses;
....


I wired the ShippingAddress to the User
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "">
<beans>
<bean id="User" class="tpb.model.User">
<property name="billingAddress">
<ref local="BillingAddress"/>
</property>
<property name="shippingAddresses">
<list>
<ref local="ShippingAddress"/>
</list>
</property>
</bean>
<bean id="ShippingAddress" class="tpb.model.ShippingAddress"/>
</beans>


When I instantiate the user it comes complete with an empty ShippingAddress in the list such that when I add another ShippingAddress it ocuppies the second slot, like this

public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("OK");
//Get the bean factory
XmlBeanFactory factory = new XmlBeanFactory(new FileSystemResource("src/beans.xml"));
User user = (User)factory.getBean("User");
user.setFirstName("Bart");
user.setLastName("Stough");
user.setUserName("CJEMSINC");
System.out.println(user.getUserName());
//Create Billing Address;
user.getBillingAddress().setCity("Brighton");
System.out.println(user.getBillingAddress().getCit y());
//create Shipping Addresses
ShippingAddress a = new ShippingAddress();
a.setCity("Denver");
-->user.getShippingAddresses().add(a);
ListIterator i = user.getShippingAddresses().listIterator();
while(i.hasNext()){
System.out.println(((ShippingAddress)i.next()).get City());
}

This outputs :

OK
Feb 5, 2009 12:47:11 PM org.springframework.beans.factory.xml.XmlBeanDefin itionReader loadBeanDefinitions
INFO: Loading XML bean definitions from file [C:\Documents and Settings\bstough\workspace\TPB\src\beans.xml]
CJEMSINC
Brighton
null <-- This is an empty ShippingAddress
Denver

Am I not configuring this right so that when I add the first ShippingAddress it occupies the first slot and not the second?

Any help would be greatly appreciated