deploymentFactories.add(factory);
if(factory == null) { throw new IllegalArgumentException("DeploymentFactory to register should not be null"); } if(!deploymentFactories.contains(factory)) { deploymentFactories.add(factory); }
    public void registerDeploymentFactory(DeploymentFactory factory) {        // apparently we dont care about null values, the Sun RI even adds the null        // to the list. So after registerDeploymentFactory(null) getDeploymentFactories()        // return an array with length 1.        deploymentFactories.add(factory);    }