private static final String [ ] deduplicateKeys ( String [ ] keys ) { synchronized ( KEY_CACHE ) { KEY_HULL . setKeys ( keys ) ; KeyContainer retrieved = KEY_CACHE . get ( KEY_HULL ) ; if ( retrieved == null ) { retrieved = new KeyContainer ( keys ) ; KEY_CACHE . put ( retrieved , retrieved ) ; } return retrieved . getKeys ( ) ; } }
Deduplicates keys arrays to keep the memory footprint on CompactMap to a minimum .