jdk/src/java.desktop/share/classes/java/beans/MetaData.java
changeset 32865 f9cb6e427f9e
parent 25859 3317bb8137f4
child 35667 ed476aba94de
equal deleted inserted replaced
32864:2a338536e642 32865:f9cb6e427f9e
   354  * The base class for persistence delegates for inner classes
   354  * The base class for persistence delegates for inner classes
   355  * that can be created using {@link Collections}.
   355  * that can be created using {@link Collections}.
   356  *
   356  *
   357  * @author Sergey A. Malenkov
   357  * @author Sergey A. Malenkov
   358  */
   358  */
   359 private static abstract class java_util_Collections extends PersistenceDelegate {
   359 private abstract static class java_util_Collections extends PersistenceDelegate {
   360     protected boolean mutatesTo(Object oldInstance, Object newInstance) {
   360     protected boolean mutatesTo(Object oldInstance, Object newInstance) {
   361         if (!super.mutatesTo(oldInstance, newInstance)) {
   361         if (!super.mutatesTo(oldInstance, newInstance)) {
   362             return false;
   362             return false;
   363         }
   363         }
   364         if ((oldInstance instanceof List) || (oldInstance instanceof Set) || (oldInstance instanceof Map)) {
   364         if ((oldInstance instanceof List) || (oldInstance instanceof Set) || (oldInstance instanceof Map)) {
  1317         internalPersistenceDelegates.put("java.util.JumboEnumSet", new java_util_EnumSet_PersistenceDelegate());
  1317         internalPersistenceDelegates.put("java.util.JumboEnumSet", new java_util_EnumSet_PersistenceDelegate());
  1318         internalPersistenceDelegates.put("java.util.RegularEnumSet", new java_util_EnumSet_PersistenceDelegate());
  1318         internalPersistenceDelegates.put("java.util.RegularEnumSet", new java_util_EnumSet_PersistenceDelegate());
  1319     }
  1319     }
  1320 
  1320 
  1321     @SuppressWarnings("rawtypes")
  1321     @SuppressWarnings("rawtypes")
  1322     public synchronized static PersistenceDelegate getPersistenceDelegate(Class type) {
  1322     public static synchronized PersistenceDelegate getPersistenceDelegate(Class type) {
  1323         if (type == null) {
  1323         if (type == null) {
  1324             return nullPersistenceDelegate;
  1324             return nullPersistenceDelegate;
  1325         }
  1325         }
  1326         if (Enum.class.isAssignableFrom(type)) {
  1326         if (Enum.class.isAssignableFrom(type)) {
  1327             return enumPersistenceDelegate;
  1327             return enumPersistenceDelegate;