@Deprecated // in 2.9.4 -- must call method that takes old and new property to avoid mismatch public void replace(SettableBeanProperty newProp) { String key = getPropertyName(newProp); int ix = _findIndexInHash(key); if (ix < 0) { throw new NoSuchElementException("No entry '"+key+"' found, can't replace"); } SettableBeanProperty prop = (SettableBeanProperty) _hashArea[ix]; _hashArea[ix] = newProp; // also, replace in in-order _propsInOrder[_findFromOrdered(prop)] = newProp; }
@Deprecated // in 2.9.4 -- must call method that takes old and new property to avoid mismatch public void replace(SettableBeanProperty newProp) { String key = getPropertyName(newProp); int ix = _findIndexInHash(key); if (ix < 0) { throw new NoSuchElementException("No entry '"+key+"' found, can't replace"); } SettableBeanProperty prop = (SettableBeanProperty) _hashArea[ix]; _hashArea[ix] = newProp; // also, replace in in-order _propsInOrder[_findFromOrdered(prop)] = newProp; }
/** * Specialized method that can be used to replace an existing entry * (note: entry MUST exist; otherwise exception is thrown) with * specified replacement. */ public void replace(SettableBeanProperty newProp) { String key = getPropertyName(newProp); int ix = _findIndexInHash(key); if (ix >= 0) { SettableBeanProperty prop = (SettableBeanProperty) _hashArea[ix]; _hashArea[ix] = newProp; // also, replace in in-order _propsInOrder[_findFromOrdered(prop)] = newProp; return; } throw new NoSuchElementException("No entry '"+key+"' found, can't replace"); }