public SettableBeanProperty find(String key) { int index = key.hashCode() & _hashMask; Bucket bucket = _buckets[index]; // Let's unroll first lookup since that is null or match in 90+% cases if (bucket == null) { return null; } // Primarily we do just identity comparison as keys should be interned if (bucket.key == key) { return bucket.value; } while ((bucket = bucket.next) != null) { if (bucket.key == key) { return bucket.value; } } // Do we need fallback for non-interned Strings? return _findWithEquals(key, index); }
public SettableBeanProperty find(String key) { int index = key.hashCode() & _hashMask; Bucket bucket = _buckets[index]; // Let's unroll first lookup since that is null or match in 90+% cases if (bucket == null) { return null; } // Primarily we do just identity comparison as keys should be interned if (bucket.key == key) { return bucket.value; } while ((bucket = bucket.next) != null) { if (bucket.key == key) { return bucket.value; } } // Do we need fallback for non-interned Strings? return _findWithEquals(key, index); }
public SettableBeanProperty find(String key) { if (key == null) { throw new IllegalArgumentException("Can not pass null property name"); } if (_caseInsensitive) { key = key.toLowerCase(); } int index = key.hashCode() & _hashMask; Bucket bucket = _buckets[index]; // Let's unroll first lookup since that is null or match in 90+% cases if (bucket == null) { return null; } // Primarily we do just identity comparison as keys should be interned if (bucket.key == key) { return bucket.value; } while ((bucket = bucket.next) != null) { if (bucket.key == key) { return bucket.value; } } // Do we need fallback for non-interned Strings? return _findWithEquals(key, index); }
public SettableBeanProperty find(String key) { if (key == null) { throw new IllegalArgumentException("Can not pass null property name"); } if (_caseInsensitive) { key = key.toLowerCase(); } int index = key.hashCode() & _hashMask; Bucket bucket = _buckets[index]; // Let's unroll first lookup since that is null or match in 90+% cases if (bucket == null) { return null; } // Primarily we do just identity comparison as keys should be interned if (bucket.key == key) { return bucket.value; } while ((bucket = bucket.next) != null) { if (bucket.key == key) { return bucket.value; } } // Do we need fallback for non-interned Strings? return _findWithEquals(key, index); }
private final boolean _findDeserializeAndSet2(JsonParser p, DeserializationContext ctxt, Object bean, String key, int index) throws IOException { SettableBeanProperty prop = null; Bucket bucket = _buckets[index]; while (true) { if ((bucket = bucket.next) == null) { prop = _findWithEquals(key, index); if (prop == null) { return false; } break; } if (bucket.key == key) { prop = bucket.value; break; } } try { prop.deserializeAndSet(p, ctxt, bean); } catch (Exception e) { wrapAndThrow(e, bean, key, ctxt); } return true; }
private final boolean _findDeserializeAndSet2(JsonParser p, DeserializationContext ctxt, Object bean, String key, int index) throws IOException { SettableBeanProperty prop = null; Bucket bucket = _buckets[index]; while (true) { if ((bucket = bucket.next) == null) { prop = _findWithEquals(key, index); if (prop == null) { return false; } break; } if (bucket.key == key) { prop = bucket.value; break; } } try { prop.deserializeAndSet(p, ctxt, bean); } catch (Exception e) { wrapAndThrow(e, bean, key, ctxt); } return true; }