Skip to content

Commit 17382ae

Browse files
committed
AbstractValueAdaptingCache subclasses may reuse NullValue.INSTANCE
Issue: SPR-15693 (cherry picked from commit 59c26f6)
1 parent 8ad3c95 commit 17382ae

File tree

1 file changed

+8
-2
lines changed
  • spring-context/src/main/java/org/springframework/cache/support

1 file changed

+8
-2
lines changed

spring-context/src/main/java/org/springframework/cache/support/NullValue.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2015 the original author or authors.
2+
* Copyright 2002-2017 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -28,7 +28,13 @@
2828
*/
2929
public final class NullValue implements Serializable {
3030

31-
static final Object INSTANCE = new NullValue();
31+
/**
32+
* The canonical representation of a {@code null} replacement, as used by the
33+
* default implementation of {@link AbstractValueAdaptingCache#toStoreValue}/
34+
* {@link AbstractValueAdaptingCache#fromStoreValue}.
35+
* @since 4.3.10
36+
*/
37+
public static final Object INSTANCE = new NullValue();
3238

3339
private static final long serialVersionUID = 1L;
3440

0 commit comments

Comments
 (0)