Reliable null value handling in ConcurrentMapCache, GuavaCache, JCacheCache

Issue: SPR-13553
(cherry picked from commit de93290)
This commit is contained in:
Juergen Hoeller
2015-10-14 14:00:02 +02:00
parent bb8a12ff78
commit 6c138d3981
2 changed files with 21 additions and 9 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2015 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.
@@ -126,6 +126,10 @@ public class JCacheCache implements Cache {
@SuppressWarnings("serial")
private static class NullHolder implements Serializable {
private Object readResolve() {
return NULL_HOLDER;
}
}
}