map = new ValueProtectingMap<String, Serializable>(holyMap, moreImmutableClasses);
props = new ValueProtectingMap<QName, Serializable>(props, NodePropertyValue.IMMUTABLE_CLASSES);
props = new ValueProtectingMap<QName, Serializable>(props, NodePropertyValue.IMMUTABLE_CLASSES);
/** * No matter how many times we wrap instances in instances, the backing map must remain * the same. */ public void testMapWrapping() { ValueProtectingMap<String, Serializable> mapTwo = new ValueProtectingMap<String, Serializable>(map); assertTrue("Backing map must be shared: ", mapTwo.getProtectedMap() == map.getProtectedMap()); ValueProtectingMap<String, Serializable> mapThree = new ValueProtectingMap<String, Serializable>(map); assertTrue("Backing map must be shared: ", mapThree.getProtectedMap() == map.getProtectedMap()); }
props = new ValueProtectingMap<QName, Serializable>(props, NodePropertyValue.IMMUTABLE_CLASSES);
props = new ValueProtectingMap<QName, Serializable>(props, NodePropertyValue.IMMUTABLE_CLASSES);