Flow descriptors should not be modified outside this class. Make sure
that is the case by wrapping it in an Collections.unmodifiableMap().
Change-Id: I188287d8d10911f6faabd5f31e028714ae005bce
Signed-off-by: Robert Varga <rovarga@cisco.com>
package org.opendaylight.openflowplugin.impl.registry.flow;
import java.util.Collection;
+import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
@Override
public Map<FlowRegistryKey, FlowDescriptor> getAllFlowDescriptors() {
- return flowRegistry;
+ return Collections.unmodifiableMap(flowRegistry);
}
@Override