jdk/src/share/classes/javax/management/MBeanNotificationInfo.java
changeset 20830 bf6aed23937e
parent 20809 b5e0612d60b9
child 20851 9f284cf7836b
equal deleted inserted replaced
20829:61b4adb0a695 20830:bf6aed23937e
   208 
   208 
   209     private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
   209     private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
   210         ObjectInputStream.GetField gf = ois.readFields();
   210         ObjectInputStream.GetField gf = ois.readFields();
   211         String[] t = (String[])gf.get("types", null);
   211         String[] t = (String[])gf.get("types", null);
   212 
   212 
   213         if (t == null) {
   213         types = (t != null && t.length != 0) ? t.clone() : NO_TYPES;
   214             throw new InvalidObjectException("Trying to deserialize an invalid " +
       
   215                                              "instance of " + MBeanNotificationInfo.class +
       
   216                                              "[types=null]");
       
   217         }
       
   218         types = t.length == 0 ? t : t.clone();
       
   219     }
   214     }
   220 }
   215 }