--- a/jdk/src/share/classes/com/sun/servicetag/RegistrationDocument.java Tue Aug 30 14:41:12 2011 +0100
+++ b/jdk/src/share/classes/com/sun/servicetag/RegistrationDocument.java Tue Aug 30 11:53:11 2011 -0700
@@ -150,9 +150,7 @@
} catch (ParserConfigurationException pce) {
// Parser with specific options can't be built
// should not reach here
- InternalError x = new InternalError("Error in creating the new document");
- x.initCause(pce);
- throw x;
+ throw new InternalError("Error in creating the new document", pce);
}
}
@@ -172,9 +170,7 @@
} catch (ParserConfigurationException pce) {
// Parser with specified options can't be built
// should not reach here
- InternalError x = new InternalError("Error in creating the new document");
- x.initCause(pce);
- throw x;
+ throw new InternalError("Error in creating the new document", pce);
}
}
@@ -195,20 +191,14 @@
new StreamResult(new BufferedWriter(new OutputStreamWriter(os, "UTF-8"))));
} catch (UnsupportedEncodingException ue) {
// Should not reach here
- InternalError x = new InternalError("Error generated during transformation");
- x.initCause(ue);
- throw x;
+ throw new InternalError("Error generated during transformation", ue);
} catch (TransformerConfigurationException tce) {
// Error generated by the parser
// Should not reach here
- InternalError x = new InternalError("Error in creating the new document");
- x.initCause(tce);
- throw x;
+ throw new InternalError("Error in creating the new document", tce);
} catch (TransformerException te) {
// Error generated by the transformer
- InternalError x = new InternalError("Error generated during transformation");
- x.initCause(te);
- throw x;
+ throw new InternalError("Error generated during transformation", te);
}
}