Now that we use Java 6, can finally deprecate IOException2.

This commit is contained in:
Jesse Glick committed 2013-11-15 08:19:59 -05:00
1 parent dbf1ea0717
commit 15ac490af1
37 files changed
+92 -144

No files matched your search

+8 -9
View File
@@ -32,7 +32,6 @@ import com.thoughtworks.xstream.io.xml.XppDriver;
import hudson.diagnosis.OldDataMonitor;
import hudson.model.Descriptor;
import hudson.util.AtomicFileWriter;
import hudson.util.IOException2;
import hudson.util.XStream2;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
@@ -142,11 +141,11 @@ public final class XmlFile {
try {
return xs.fromXML(in);
} catch(StreamException e) {
throw new IOException2("Unable to read "+file,e);
throw new IOException("Unable to read "+file,e);
} catch(ConversionException e) {
throw new IOException2("Unable to read "+file,e);
throw new IOException("Unable to read "+file,e);
} catch(Error e) {// mostly reflection errors
throw new IOException2("Unable to read "+file,e);
throw new IOException("Unable to read "+file,e);
} finally {
in.close();
}
@@ -165,11 +164,11 @@ public final class XmlFile {
// TODO: expose XStream the driver from XStream
return xs.unmarshal(DEFAULT_DRIVER.createReader(in), o);
} catch (StreamException e) {
throw new IOException2("Unable to read "+file,e);
throw new IOException("Unable to read "+file,e);
} catch(ConversionException e) {
throw new IOException2("Unable to read "+file,e);
throw new IOException("Unable to read "+file,e);
} catch(Error e) {// mostly reflection errors
throw new IOException2("Unable to read "+file,e);
throw new IOException("Unable to read "+file,e);
} finally {
in.close();
}
@@ -183,7 +182,7 @@ public final class XmlFile {
xs.toXML(o,w);
w.commit();
} catch(StreamException e) {
throw new IOException2(e);
throw new IOException(e);
} finally {
w.abort();
}
@@ -294,7 +293,7 @@ public final class XmlFile {
// in such a case, assume UTF-8 rather than fail, since Jenkins internally always write XML in UTF-8
return "UTF-8";
} catch (SAXException e) {
throw new IOException2("Failed to detect encoding of "+file,e);
throw new IOException("Failed to detect encoding of "+file,e);
} catch (ParserConfigurationException e) {
throw new AssertionError(e); // impossible
} finally {