8203263: Remove unnecessary throws clauses from serialization-related methods
Reviewed-by: prr
--- a/src/java.desktop/share/classes/java/awt/Font.java Wed Jul 18 14:32:46 2018 -0700
+++ b/src/java.desktop/share/classes/java/awt/Font.java Wed Jul 18 16:13:21 2018 -0700
@@ -1895,8 +1895,7 @@
* @see #readObject(java.io.ObjectInputStream)
*/
private void writeObject(java.io.ObjectOutputStream s)
- throws java.lang.ClassNotFoundException,
- java.io.IOException
+ throws java.io.IOException
{
if (values != null) {
synchronized(values) {
--- a/src/java.desktop/share/classes/java/awt/MenuBar.java Wed Jul 18 14:32:46 2018 -0700
+++ b/src/java.desktop/share/classes/java/awt/MenuBar.java Wed Jul 18 16:13:21 2018 -0700
@@ -432,8 +432,7 @@
* @see #readObject(java.io.ObjectInputStream)
*/
private void writeObject(java.io.ObjectOutputStream s)
- throws java.lang.ClassNotFoundException,
- java.io.IOException
+ throws java.io.IOException
{
s.defaultWriteObject();
}
--- a/src/java.desktop/share/classes/java/awt/font/TransformAttribute.java Wed Jul 18 14:32:46 2018 -0700
+++ b/src/java.desktop/share/classes/java/awt/font/TransformAttribute.java Wed Jul 18 16:13:21 2018 -0700
@@ -100,8 +100,7 @@
public static final TransformAttribute IDENTITY = new TransformAttribute(null);
private void writeObject(java.io.ObjectOutputStream s)
- throws java.lang.ClassNotFoundException,
- java.io.IOException
+ throws java.io.IOException
{
// sigh -- 1.3 expects transform is never null, so we need to always write one out
if (this.transform == null) {
--- a/src/java.desktop/share/classes/java/awt/geom/AffineTransform.java Wed Jul 18 14:32:46 2018 -0700
+++ b/src/java.desktop/share/classes/java/awt/geom/AffineTransform.java Wed Jul 18 16:13:21 2018 -0700
@@ -3943,7 +3943,7 @@
private static final long serialVersionUID = 1330973210523860834L;
private void writeObject(java.io.ObjectOutputStream s)
- throws java.lang.ClassNotFoundException, java.io.IOException
+ throws java.io.IOException
{
s.defaultWriteObject();
}
--- a/src/java.desktop/share/classes/java/beans/beancontext/BeanContextSupport.java Wed Jul 18 14:32:46 2018 -0700
+++ b/src/java.desktop/share/classes/java/beans/beancontext/BeanContextSupport.java Wed Jul 18 16:13:21 2018 -0700
@@ -998,7 +998,7 @@
* @param oos the ObjectOutputStream
*/
- private synchronized void writeObject(ObjectOutputStream oos) throws IOException, ClassNotFoundException {
+ private synchronized void writeObject(ObjectOutputStream oos) throws IOException {
serializing = true;
synchronized (BeanContext.globalHierarchyLock) {