diff options
Diffstat (limited to 'plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core')
11 files changed, 35 insertions, 46 deletions
diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/RulesLogHandler.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/RulesLogHandler.java index ab0557461ce..c8acc8bdfde 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/RulesLogHandler.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/text/RulesLogHandler.java @@ -15,7 +15,6 @@ import java.io.IOException; import java.util.logging.Handler; import java.util.logging.LogRecord; import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.TransformerException; import org.apache.xml.serialize.OutputFormat; import org.eclipse.osee.framework.jdk.core.util.xml.Jaxp; import org.w3c.dom.Document; @@ -59,8 +58,6 @@ public class RulesLogHandler extends Handler { Jaxp.writeXmlDocument(document, outFile, format); } catch (IOException ex) { ex.printStackTrace(); - } catch (TransformerException ex) { - ex.printStackTrace(); } } } diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreWriter.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreWriter.java index db194632fc5..10f493c4503 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreWriter.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/type/PropertyStoreWriter.java @@ -57,7 +57,7 @@ public class PropertyStoreWriter { writer.close(); } - public void save(PropertyStore store, Writer writer) throws IOException { + public void save(PropertyStore store, Writer writer) { XMLWriter internalWriter = new XMLWriter(writer); internalSave(store, internalWriter); } diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/StringDataSource.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/StringDataSource.java index ca232899ad1..45df739d4dc 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/StringDataSource.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/StringDataSource.java @@ -11,7 +11,6 @@ package org.eclipse.osee.framework.jdk.core.util; import java.io.ByteArrayInputStream; -import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import javax.activation.DataSource; @@ -33,7 +32,7 @@ public class StringDataSource implements DataSource { } @Override - public InputStream getInputStream() throws IOException { + public InputStream getInputStream() { return new ByteArrayInputStream(data.getBytes()); } @@ -43,7 +42,7 @@ public class StringDataSource implements DataSource { } @Override - public OutputStream getOutputStream() throws IOException { + public OutputStream getOutputStream() { throw new UnsupportedOperationException(); } diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/CharBackedInputStream.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/CharBackedInputStream.java index b656e0a0c73..6a79e7f58ac 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/CharBackedInputStream.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/CharBackedInputStream.java @@ -49,12 +49,12 @@ public class CharBackedInputStream extends InputStream implements Appendable { } @Override - public void flush() throws IOException { + public void flush() { // } @Override - public void close() throws IOException { + public void close() { // } @@ -158,13 +158,13 @@ public class CharBackedInputStream extends InputStream implements Appendable { } @Override - public Appendable append(char c) throws IOException { + public Appendable append(char c) { throw new UnsupportedOperationException( "doing this one character at a time would be so inefficient it would defeat the whole purpose of this class"); } @Override - public int available() throws IOException { + public int available() { int count = 0; for (ByteBuffer backer : backers) { count += backer.array().length; diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/xml/AbstractSaxHandler.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/xml/AbstractSaxHandler.java index 3b00d582661..4a21f84c911 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/xml/AbstractSaxHandler.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/xml/AbstractSaxHandler.java @@ -19,15 +19,15 @@ import org.xml.sax.helpers.DefaultHandler; /** * <p> * If you want to preserve CDATA sections you need to follow this pattern:<br/> - * + * * <pre> * XMLReader xmlReader = XMLReaderFactory.createXMLReader(); * xmlReader.setContentHandler(this); * xmlReader.setProperty("http://xml.org/sax/properties/lexical-handler", this); //This is the important part * </pre> - * + * * </p> - * + * * @author Ryan D. Brooks */ public abstract class AbstractSaxHandler extends DefaultHandler implements LexicalHandler { @@ -45,7 +45,7 @@ public abstract class AbstractSaxHandler extends DefaultHandler implements Lexic } @Override - public void characters(char[] ch, int start, int length) throws SAXException { + public void characters(char[] ch, int start, int length) { if (maxContentLength > 0 && contents.length() + length > maxContentLength) { return; // don't add more characters if doing so will make the content too long } @@ -85,37 +85,37 @@ public abstract class AbstractSaxHandler extends DefaultHandler implements Lexic } @Override - public void comment(char[] ch, int start, int length) throws SAXException { + public void comment(char[] ch, int start, int length) { //Do nothing } @Override - public void endCDATA() throws SAXException { + public void endCDATA() { contents.append("]]>"); } @Override - public void endDTD() throws SAXException { + public void endDTD() { //Do nothing } @Override - public void endEntity(String name) throws SAXException { + public void endEntity(String name) { //Do nothing } @Override - public void startCDATA() throws SAXException { + public void startCDATA() { contents.append("<![CDATA["); } @Override - public void startDTD(String name, String publicId, String systemId) throws SAXException { + public void startDTD(String name, String publicId, String systemId) { //Do nothing } @Override - public void startEntity(String name) throws SAXException { + public void startEntity(String name) { //Do nothing } }
\ No newline at end of file diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/xml/WordMlTableWriter.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/xml/WordMlTableWriter.java index 17480fa155d..0161d512825 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/xml/WordMlTableWriter.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/xml/WordMlTableWriter.java @@ -11,7 +11,6 @@ package org.eclipse.osee.framework.jdk.core.util.io.xml; import java.io.IOException; -import java.nio.charset.CharacterCodingException; /** * @author Jeff C. Phillips @@ -31,7 +30,7 @@ public class WordMlTableWriter extends AbstractSheetWriter { private int columnSize; private boolean startTable; - public WordMlTableWriter(Appendable str) throws CharacterCodingException { + public WordMlTableWriter(Appendable str) { this.str = str; } @@ -81,6 +80,6 @@ public class WordMlTableWriter extends AbstractSheetWriter { } @Override - public void endWorkbook() throws IOException { + public void endWorkbook() { } } diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/xml/WordSaxHandler.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/xml/WordSaxHandler.java index 50c7ca1deac..039521360fd 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/xml/WordSaxHandler.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/io/xml/WordSaxHandler.java @@ -35,7 +35,7 @@ public class WordSaxHandler extends AbstractSaxHandler { } @Override - public void startElementFound(String uri, String localName, String qName, Attributes attributes) throws SAXException { + public void startElementFound(String uri, String localName, String qName, Attributes attributes) { if (localName.equalsIgnoreCase("hdr")) { inHeader = true; } else if (localName.equalsIgnoreCase("ftr")) { diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/windows/Registry.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/windows/Registry.java index 3c7724750b7..847009c956a 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/windows/Registry.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/windows/Registry.java @@ -11,7 +11,6 @@ package org.eclipse.osee.framework.jdk.core.util.windows; import java.io.File; -import java.io.IOException; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.eclipse.osee.framework.jdk.core.util.Processes; @@ -94,7 +93,7 @@ public class Registry { } } - public static boolean isRegVersion(double lowerBound, double upperBound) throws IOException { + public static boolean isRegVersion(double lowerBound, double upperBound) { boolean matched = false; String out = Processes.executeCommandToString(Registry.REG_HELP_CMD); @@ -112,7 +111,7 @@ public class Registry { return matched; } - public static RegVersion getVersion() throws IOException { + public static RegVersion getVersion() { Registry r = new Registry(); RegVersion regVersion = null; if (Registry.isRegVersion(1.00, 1.99)) { @@ -123,7 +122,7 @@ public class Registry { return regVersion; } - public static String[] getValue(RegVersion version, String root, String path, String key) throws IOException { + public static String[] getValue(RegVersion version, String root, String path, String key) { String toReturn[] = null; String out = Processes.executeCommandToString(version.getQueryCmd(root, path, key)); @@ -146,7 +145,7 @@ public class Registry { return toReturn; } - public static boolean prependRegistryValue(File updatedReg, String root, String path, String key, String value) throws IOException { + public static boolean prependRegistryValue(File updatedReg, String root, String path, String key, String value) { RegVersion version = Registry.getVersion(); @@ -181,7 +180,7 @@ public class Registry { return true; } - public static boolean prependRegistryValue(String root, String path, String key, String value) throws IOException { + public static boolean prependRegistryValue(String root, String path, String key, String value) { RegVersion version = Registry.getVersion(); @@ -198,11 +197,7 @@ public class Registry { } public static void main(String[] args) { - try { - Registry.prependRegistryValue(Registry.HKEY_CURRENT_USER, "environment", "path", "HI THERE"); - } catch (IOException ex) { - ex.printStackTrace(); - } + Registry.prependRegistryValue(Registry.HKEY_CURRENT_USER, "environment", "path", "HI THERE"); } } diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/Jaxp.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/Jaxp.java index 842a4d2c91d..4c0daffb203 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/Jaxp.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/Jaxp.java @@ -497,7 +497,7 @@ public class Jaxp { * @param document The XML document to output * @param file Where to put the output */ - public static void writeXmlDocument(Document document, File file) throws TransformerException, IOException { + public static void writeXmlDocument(Document document, File file) throws IOException { writeXmlDocument(document, file, getCompactFormat(document)); } @@ -509,7 +509,7 @@ public class Jaxp { * @param prettyOutput If true, turns on indention so the output is more easily readable, if False turns indention * off to save space. */ - public static void writeXmlDocument(Document document, File file, OutputFormat format) throws TransformerException, IOException { + public static void writeXmlDocument(Document document, File file, OutputFormat format) throws IOException { BufferedWriter out = new BufferedWriter(new FileWriter(file)); outputXmlDocument(document, out, format); out.close(); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/Xml.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/Xml.java index 23bb2a1fff3..af66e1ec7ef 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/Xml.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/Xml.java @@ -17,7 +17,6 @@ import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.TransformerException; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; import javax.xml.xpath.XPathExpressionException; @@ -269,7 +268,7 @@ public class Xml { return newElement; } - public final static String restartNumberingWhenPreparingToEditWithWord(InputStream myInputStream) throws XPathExpressionException, ParserConfigurationException, TransformerException, SAXException, IOException { + public final static String restartNumberingWhenPreparingToEditWithWord(InputStream myInputStream) throws XPathExpressionException, ParserConfigurationException, SAXException, IOException { SimpleNamespaceContext mySimpleNamespaceContext = new SimpleNamespaceContext(); addNamespacesForWordMarkupLanguage(myXPath, mySimpleNamespaceContext); Document myDocument = Jaxp.readXmlDocumentNamespaceAware(myInputStream); diff --git a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/parser/GenericParser.java b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/parser/GenericParser.java index 1a2767eeb59..f70b1c2deb3 100644 --- a/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/parser/GenericParser.java +++ b/plugins/org.eclipse.osee.framework.jdk.core/src/org/eclipse/osee/framework/jdk/core/util/xml/parser/GenericParser.java @@ -53,7 +53,7 @@ public class GenericParser extends AbstractSaxHandler { } @Override - public void startElementFound(String uri, String localName, String qName, Attributes attributes) throws SAXException { + public void startElementFound(String uri, String localName, String qName, Attributes attributes) { if (localName.equalsIgnoreCase(toFind)) { startCollecting = true; collectedTree = new Tree<XmlNode>(new XmlNode(localName, attributes)); @@ -71,7 +71,7 @@ public class GenericParser extends AbstractSaxHandler { } @Override - public void endElementFound(String uri, String localName, String qName) throws SAXException { + public void endElementFound(String uri, String localName, String qName) { if (localName.equalsIgnoreCase(toFind)) { startCollecting = false; notifyTreeCollected(collectedTree); @@ -146,17 +146,17 @@ public class GenericParser extends AbstractSaxHandler { xmlReader.setErrorHandler(new ErrorHandler() { @Override - public void warning(SAXParseException exception) throws SAXException { + public void warning(SAXParseException exception) { exception.printStackTrace(); } @Override - public void fatalError(SAXParseException exception) throws SAXException { + public void fatalError(SAXParseException exception) { exception.printStackTrace(); } @Override - public void error(SAXParseException exception) throws SAXException { + public void error(SAXParseException exception) { exception.printStackTrace(); } |