Bug 5095 template: toarray incorrect
its defintion should be: (${type}[]) ${collection}.toArray(new ${type}[${collection}.size()]); rather than (${type}[]) ${collection}.toArray(new ${type}[${collection}]);
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/template/TemplateSet.java
} catch (IOException e) {
			JavaPlugin.log(e);
			return null;
		}
	}
	/**
	 * Resets the template set with the default templates.
	 */
	public void restoreDefaults() {
		clear();
		addFromStream(getDefaultsAsStream());
	}
	
	/**
	 * Resets (reloads) the template set.
	 */
	public void reset() {
		clear();
		try {
			addFromStream(new FileInputStream(getTemplateFile()));
		} catch (FileNotFoundException e) {
			JavaPlugin.log(e);
		}
	}
	public boolean addFromStream(InputStream stream) {
		try {
			TemplateSet templateSet= new TemplateSet();
			
			DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
			DocumentBuilder parser= factory.newDocumentBuilder();