Refine search
@SuppressWarnings("unchecked") // we have to trust that keys are Ks and values are Vs private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { GetField fields = stream.readFields(); comparator = (Comparator<? super K>) fields.get("comparator", null); if (comparator == null) { comparator = (Comparator<? super K>) NATURAL_ORDER; } int size = stream.readInt(); for (int i = 0; i < size; i++) { putInternal((K) stream.readObject(), (V) stream.readObject()); } }
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { ObjectInputStream.GetField fields = in.readFields(); if (!fields.defaulted("blargh")) { throw new Error(); } try { fields.defaulted("nonexistant"); throw new Error(); } catch (IllegalArgumentException ex) { } if ((fields.get("z", false) != true) || (fields.get("b", (byte) 0) != 5) || (fields.get("c", '0') != '5') || (fields.get("s", (short) 0) != 5) || (fields.get("i", 0) != 5) || (fields.get("j", 0l) != 5) || (fields.get("f", 0.0f) != 5.0f) || (fields.get("d", 0.0) != 5.0) || (!fields.get("str", null).equals("5"))) { throw new Error(); } } }
@SuppressWarnings("unchecked") private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { ObjectInputStream.GetField readFields = in.readFields(); sourceBean = readFields.get("source", null); listeners = new CopyOnWriteArrayList<PropertyChangeListener>(); Map<String, PropertyChangeSupport> children = (Map<String, PropertyChangeSupport>) readFields.get("children", null); if (children != null) { for (Map.Entry<String, PropertyChangeSupport> entry : children.entrySet()) { for (PropertyChangeListener p : entry.getValue().listeners) { listeners.add(new PropertyChangeListenerProxy(entry.getKey(), p)); } } } PropertyChangeListener listener; while ((listener = (PropertyChangeListener) in.readObject()) != null) { listeners.add(listener); } }
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { ObjectInputStream.GetField fields = stream.readFields(); rawOffset = fields.get("rawOffset", 0); useDaylight = fields.get("useDaylight", false); if (useDaylight) { endMonth = fields.get("endMonth", 0); endTime = fields.get("endTime", 0); startMonth = fields.get("startMonth", 0); startTime = fields.get("startTime", 0); startYear = fields.get("startYear", 0); if (fields.get("serialVersionOnStream", 0) == 0) { if (useDaylight) { startMode = endMode = DOW_IN_MONTH_MODE; endDay = fields.get("endDay", 0); endDayOfWeek = fields.get("endDayOfWeek", 0) - 1; startDay = fields.get("startDay", 0); startDayOfWeek = fields.get("startDayOfWeek", 0) - 1; dstSavings = fields.get("dstSavings", 0); if (useDaylight) { endMode = fields.get("endMode", 0); startMode = fields.get("startMode", 0); int length = stream.readInt(); byte[] values = new byte[length]; stream.readFully(values); if (length >= 4) { startDay = values[0];
@SuppressWarnings("unchecked") private SerializedForm(ObjectInputStream.GetField fields) throws IOException { fCount = (AtomicInteger) fields.get("fCount", null); fIgnoreCount = (AtomicInteger) fields.get("fIgnoreCount", null); assumptionFailureCount = (AtomicInteger) fields.get("assumptionFailureCount", null); fFailures = (List<Failure>) fields.get("fFailures", null); fRunTime = fields.get("fRunTime", 0L); fStartTime = fields.get("fStartTime", 0L); }
/** Reads object from input stream, if it is * LocalFileSystem or JarFileSystem then replaces the object * by its Impl. */ static Object readImpl(String name, ObjectInputStream.GetField fields) throws ClassNotFoundException, IOException { Object o = fields.get(name, null); if (o instanceof LocalFileSystem) { return new LocalFileSystem.Impl((LocalFileSystem) o); } else if (o instanceof JarFileSystem) { return new JarFileSystem.Impl((JarFileSystem) o); } return o; }
/** * Reconstitutes the instance from a stream (that is, deserializes it). */ private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException, java.io.InvalidObjectException { // Note: This must be changed if any additional fields are defined Object a = s.readFields().get("array", null); if (a == null || !a.getClass().isArray()) throw new java.io.InvalidObjectException("Not array type"); if (a.getClass() != Object[].class) a = Arrays.copyOf((Object[])a, Array.getLength(a), Object[].class); unsafe.putObjectVolatile(this, arrayFieldOffset, a); }
@SuppressWarnings("unchecked") // we have to trust that keys are Ks and values are Vs private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { GetField fields = stream.readFields(); comparator = (Comparator<? super K>) fields.get("comparator", null); if (comparator == null) { comparator = (Comparator<? super K>) NATURAL_ORDER; } int size = stream.readInt(); for (int i = 0; i < size; i++) { putInternal((K) stream.readObject(), (V) stream.readObject()); } }
private synchronized void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { ObjectInputStream.GetField gfields = in.readFields(); @SuppressWarnings("unchecked") Hashtable<String, BundlePermission> hashtable = (Hashtable<String, BundlePermission>) gfields.get("permissions", null); permissions = new HashMap<String, BundlePermission>(hashtable); all_allowed = gfields.get("all_allowed", false); } }
@SuppressWarnings("unchecked") // we have to trust that keys are Ks and values are Vs private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { GetField fields = stream.readFields(); comparator = (Comparator<? super K>) fields.get("comparator", null); if (comparator == null) { comparator = (Comparator<? super K>) NATURAL_ORDER; } int size = stream.readInt(); for (int i = 0; i < size; i++) { putInternal((K) stream.readObject(), (V) stream.readObject()); } }
private synchronized void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { ObjectInputStream.GetField gfields = in.readFields(); @SuppressWarnings("unchecked") Hashtable<String, AdminPermission> hashtable = (Hashtable<String, AdminPermission>) gfields.get("permissions", null); permissions = new HashMap<String, AdminPermission>(hashtable); all_allowed = gfields.get("all_allowed", false); } }
@SuppressWarnings("unchecked") // we have to trust that keys are Ks and values are Vs private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { GetField fields = stream.readFields(); comparator = (Comparator<? super K>) fields.get("comparator", null); if (comparator == null) { comparator = (Comparator<? super K>) NATURAL_ORDER; } int size = stream.readInt(); for (int i = 0; i < size; i++) { putInternal((K) stream.readObject(), (V) stream.readObject()); } }
private synchronized void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { ObjectInputStream.GetField gfields = in.readFields(); permissions = (HashMap<String, EndpointPermission>) gfields.get("permissions", new HashMap<String, EndpointPermission>()); all_allowed = gfields.get("all_allowed", false); } }
private synchronized void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { ObjectInputStream.GetField gfields = in.readFields(); Hashtable<String, TopicPermission> hashtable = (Hashtable<String, TopicPermission>) gfields.get("permissions", null); permissions = new HashMap<String, TopicPermission>(hashtable); all_allowed = gfields.get("all_allowed", false); } }
private synchronized void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { ObjectInputStream.GetField gfields = in.readFields(); boolean hasElement = gfields.get("hasElement", false); if (hasElement) { // old format permissions = new HashMap<String, ConfigurationPermission>(); permissions.put("*", new ConfigurationPermission("*", ConfigurationPermission.CONFIGURE)); all_allowed = true; } else { permissions = (HashMap<String, ConfigurationPermission>) gfields.get("permissions", new HashMap<String, ConfigurationPermission>()); all_allowed = gfields.get("all_allowed", false); } } }
private synchronized void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { ObjectInputStream.GetField gfields = in.readFields(); @SuppressWarnings("unchecked") Hashtable<String, ServicePermission> hashtable = (Hashtable<String, ServicePermission>) gfields.get("permissions", null); permissions = new HashMap<String, ServicePermission>(hashtable); all_allowed = gfields.get("all_allowed", false); @SuppressWarnings("unchecked") HashMap<String, ServicePermission> fp = (HashMap<String, ServicePermission>) gfields.get("filterPermissions", null); filterPermissions = fp; } }
private synchronized void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { ObjectInputStream.GetField gfields = in.readFields(); @SuppressWarnings("unchecked") Hashtable<String, PackagePermission> hashtable = (Hashtable<String, PackagePermission>) gfields.get("permissions", null); permissions = new HashMap<String, PackagePermission>(hashtable); all_allowed = gfields.get("all_allowed", false); @SuppressWarnings("unchecked") HashMap<String, PackagePermission> fp = (HashMap<String, PackagePermission>) gfields.get("filterPermissions", null); filterPermissions = fp; } }
private synchronized void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { ObjectInputStream.GetField gfields = in.readFields(); @SuppressWarnings("unchecked") HashMap<String, AdaptPermission> p = (HashMap<String, AdaptPermission>) gfields.get("permissions", null); permissions = p; all_allowed = gfields.get("all_allowed", false); } }
private synchronized void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { ObjectInputStream.GetField gfields = in.readFields(); permissions = (HashMap<String, CoordinationPermission>) gfields.get("permissions", null); all_allowed = gfields.get("all_allowed", false); } }
private synchronized void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException { ObjectInputStream.GetField gfields = in.readFields(); HashMap<String, SubsystemPermission> p = (HashMap<String, SubsystemPermission>) gfields.get("permissions", null); permissions = p; all_allowed = gfields.get("all_allowed", false); } }