LinkedMultiValueMap should implement Serializable (SPR-6765)

This commit is contained in:
Juergen Hoeller 2010-01-25 20:04:01 +00:00
parent bc37c50972
commit 0968e9fbd0
1 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 the original author or authors.
* Copyright 2002-2010 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,6 +16,7 @@
package org.springframework.util;
import java.io.Serializable;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.LinkedList;
@ -34,7 +35,9 @@ import java.util.Set;
* @author Juergen Hoeller
* @since 3.0
*/
public class LinkedMultiValueMap<K, V> implements MultiValueMap<K, V> {
public class LinkedMultiValueMap<K, V> implements MultiValueMap<K, V>, Serializable {
private static final long serialVersionUID = 3801124242820219131L;
private final Map<K, List<V>> targetMap;
@ -64,6 +67,7 @@ public class LinkedMultiValueMap<K, V> implements MultiValueMap<K, V> {
this.targetMap = new LinkedHashMap<K, List<V>>(otherMap);
}
// MultiValueMap implementation
public void add(K key, V value) {
@ -100,6 +104,7 @@ public class LinkedMultiValueMap<K, V> implements MultiValueMap<K, V> {
return singleValueMap;
}
// Map implementation
public int size() {