Mercurial > projects > dwt-addons
diff dwtx/jface/text/templates/persistence/TemplateReaderWriter.d @ 136:6dcb0baaa031
Regex removal of throws decls, some instanceof
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Sun, 24 Aug 2008 02:20:40 +0200 |
parents | 51e6e63f930e |
children | b6bad70d540a |
line wrap: on
line diff
--- a/dwtx/jface/text/templates/persistence/TemplateReaderWriter.d Sun Aug 24 01:52:31 2008 +0200 +++ b/dwtx/jface/text/templates/persistence/TemplateReaderWriter.d Sun Aug 24 02:20:40 2008 +0200 @@ -92,7 +92,7 @@ * @return the read templates, encapsulated in instances of <code>TemplatePersistenceData</code> * @throws IOException if reading from the stream fails */ - public TemplatePersistenceData[] read(Reader reader) throws IOException { + public TemplatePersistenceData[] read(Reader reader) { return read(reader, null); } @@ -108,7 +108,7 @@ * @throws IOException if reading from the stream fails * @since 3.1 */ - public TemplatePersistenceData readSingle(Reader reader, String id) throws IOException { + public TemplatePersistenceData readSingle(Reader reader, String id) { TemplatePersistenceData[] datas= read(new InputSource(reader), null, id); if (datas.length > 0) return datas[0]; @@ -123,7 +123,7 @@ * @return the read templates, encapsulated in instances of <code>TemplatePersistenceData</code> * @throws IOException if reading from the stream fails */ - public TemplatePersistenceData[] read(Reader reader, ResourceBundle bundle) throws IOException { + public TemplatePersistenceData[] read(Reader reader, ResourceBundle bundle) { return read(new InputSource(reader), bundle, null); } @@ -135,7 +135,7 @@ * @return the read templates, encapsulated in instances of <code>TemplatePersistenceData</code> * @throws IOException if reading from the stream fails */ - public TemplatePersistenceData[] read(InputStream stream, ResourceBundle bundle) throws IOException { + public TemplatePersistenceData[] read(InputStream stream, ResourceBundle bundle) { return read(new InputSource(stream), bundle, null); } @@ -148,7 +148,7 @@ * @return the read templates, encapsulated in instances of <code>TemplatePersistenceData</code> * @throws IOException if reading from the stream fails */ - private TemplatePersistenceData[] read(InputSource source, ResourceBundle bundle, String singleId) throws IOException { + private TemplatePersistenceData[] read(InputSource source, ResourceBundle bundle, String singleId) { try { Collection templates= new ArrayList(); Set ids= new HashSet(); @@ -234,7 +234,7 @@ * @param stream the byte output to write the templates to in XML * @throws IOException if writing the templates fails */ - public void save(TemplatePersistenceData[] templates, OutputStream stream) throws IOException { + public void save(TemplatePersistenceData[] templates, OutputStream stream) { save(templates, new StreamResult(stream)); } @@ -245,7 +245,7 @@ * @param writer the writer to write the templates to in XML * @throws IOException if writing the templates fails */ - public void save(TemplatePersistenceData[] templates, Writer writer) throws IOException { + public void save(TemplatePersistenceData[] templates, Writer writer) { save(templates, new StreamResult(writer)); } @@ -256,7 +256,7 @@ * @param result the stream result to write to * @throws IOException if writing the templates fails */ - private void save(TemplatePersistenceData[] templates, StreamResult result) throws IOException { + private void save(TemplatePersistenceData[] templates, StreamResult result) { try { DocumentBuilderFactory factory= DocumentBuilderFactory.newInstance(); DocumentBuilder builder= factory.newDocumentBuilder(); @@ -336,7 +336,7 @@ } } - private bool getBooleanValue(NamedNodeMap attributes, String attribute, bool defaultValue) throws SAXException { + private bool getBooleanValue(NamedNodeMap attributes, String attribute, bool defaultValue) { Node enabledNode= attributes.getNamedItem(attribute); if (enabledNode is null) return defaultValue; @@ -348,7 +348,7 @@ throw new SAXException(TemplatePersistenceMessages.getString("TemplateReaderWriter.error.illegal_boolean_attribute")); //$NON-NLS-1$ } - private String getStringValue(NamedNodeMap attributes, String name) throws SAXException { + private String getStringValue(NamedNodeMap attributes, String name) { String val= getStringValue(attributes, name, null); if (val is null) throw new SAXException(TemplatePersistenceMessages.getString("TemplateReaderWriter.error.missing_attribute")); //$NON-NLS-1$