question: public static < V > void makeMapSerializable ( Map < String , V > map ) { Set < String > keysToRemove = new LinkedHashSet < String > ( ) ; for ( Map . Entry < String , V > mapEntry : map . entrySet ( ) ) { Object entryValue = mapEntry . getValue ( ) ; if ( entryValue != null && ! ( entryValue instanceof Serializable ) ) { keysToRemove . add ( mapEntry . getKey ( ) ) ; } } for ( String keyToRemove : keysToRemove ) { map . remove ( keyToRemove ) ; } }
target:  This change a Map to be Serializable by removing all entries with values that are not Serializable.