package org.geojson.object;

import java.util.List;

public class FeatureCollection {
	
	private List<Feature> features;
	
	public FeatureCollection(List<Feature> features) {
		this.features = features;
	}
	
	public Feature[] getFeatures() {
		return features.toArray(new Feature[0]);
	}
}
package org.geojson.object;

public class FeatureCollection {
	
	private Feature[] features;
	
	public FeatureCollection(Feature[] features) {
		this.features = features;
	}
	
	public Feature[] getFeatures() {
		return features;
	}
	
	public void setFeatures(Feature[] features) {
		this.features = features;
	}
}
--- 
+++ 
@@ -1,18 +1,16 @@
 package org.geojson.object;
+
+import java.util.List;
 
 public class FeatureCollection {
 	
-	private Feature[] features;
+	private List<Feature> features;
 	
-	public FeatureCollection(Feature[] features) {
+	public FeatureCollection(List<Feature> features) {
 		this.features = features;
 	}
 	
 	public Feature[] getFeatures() {
-		return features;
-	}
-	
-	public void setFeatures(Feature[] features) {
-		this.features = features;
+		return features.toArray(new Feature[0]);
 	}
 }
REFACTORED: Use List<Feature> instead array in constructor.