Loading core/java/android/os/Parcel.java +53 −51 Original line number Diff line number Diff line Loading @@ -2797,14 +2797,19 @@ public final class Parcel { return null; } Parcelable.Creator<?> creator; HashMap<String, Parcelable.Creator<?>> map; synchronized (mCreators) { HashMap<String,Parcelable.Creator<?>> map = mCreators.get(loader); map = mCreators.get(loader); if (map == null) { map = new HashMap<>(); mCreators.put(loader, map); } creator = map.get(name); if (creator == null) { } if (creator != null) { return creator; } try { // If loader == null, explicitly emulate Class.forName(String) "caller // classloader" behavior. Loading Loading @@ -2832,18 +2837,15 @@ public final class Parcel { + "CREATOR on class " + name); } creator = (Parcelable.Creator<?>) f.get(null); } catch (IllegalAccessException e) { } catch (IllegalAccessException e) { Log.e(TAG, "Illegal access when unmarshalling: " + name, e); throw new BadParcelableException( "IllegalAccessException when unmarshalling: " + name); } catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) { Log.e(TAG, "Class not found when unmarshalling: " + name, e); throw new BadParcelableException( "ClassNotFoundException when unmarshalling: " + name); } catch (NoSuchFieldException e) { } catch (NoSuchFieldException e) { throw new BadParcelableException("Parcelable protocol requires a " + "Parcelable.Creator object called " + "CREATOR on class " + name); Loading @@ -2854,9 +2856,9 @@ public final class Parcel { + "CREATOR on class " + name); } synchronized (mCreators) { map.put(name, creator); } } return creator; } Loading Loading
core/java/android/os/Parcel.java +53 −51 Original line number Diff line number Diff line Loading @@ -2797,14 +2797,19 @@ public final class Parcel { return null; } Parcelable.Creator<?> creator; HashMap<String, Parcelable.Creator<?>> map; synchronized (mCreators) { HashMap<String,Parcelable.Creator<?>> map = mCreators.get(loader); map = mCreators.get(loader); if (map == null) { map = new HashMap<>(); mCreators.put(loader, map); } creator = map.get(name); if (creator == null) { } if (creator != null) { return creator; } try { // If loader == null, explicitly emulate Class.forName(String) "caller // classloader" behavior. Loading Loading @@ -2832,18 +2837,15 @@ public final class Parcel { + "CREATOR on class " + name); } creator = (Parcelable.Creator<?>) f.get(null); } catch (IllegalAccessException e) { } catch (IllegalAccessException e) { Log.e(TAG, "Illegal access when unmarshalling: " + name, e); throw new BadParcelableException( "IllegalAccessException when unmarshalling: " + name); } catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) { Log.e(TAG, "Class not found when unmarshalling: " + name, e); throw new BadParcelableException( "ClassNotFoundException when unmarshalling: " + name); } catch (NoSuchFieldException e) { } catch (NoSuchFieldException e) { throw new BadParcelableException("Parcelable protocol requires a " + "Parcelable.Creator object called " + "CREATOR on class " + name); Loading @@ -2854,9 +2856,9 @@ public final class Parcel { + "CREATOR on class " + name); } synchronized (mCreators) { map.put(name, creator); } } return creator; } Loading