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);
		} catch (SAXException e) {
			JavaPlugin.log(e);
		}
		
		sort();
		
		return false;
	}
	/**
	 * Saves the template set.
	 */
	public boolean save() {					
		try {
			fgTemplateSet.saveToStream(new FileOutputStream(getTemplateFile()));
			return true;
		} catch (IOException e) {
			JavaPlugin.log(e);
			return false;
		}
	}
	/**
	 * Saves the template set as XML.
	 */
	public void saveToStream(OutputStream stream) throws IOException {
		try {
			DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance();
			DocumentBuilder builder= factory.newDocumentBuilder();		
			Document document= builder.newDocument();