ensuring non-null cache strategy
Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/5f7b6ddf Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/5f7b6ddf Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/5f7b6ddf Branch: refs/heads/CAY-1946 Commit: 5f7b6ddf4abcd284d33251c6eabecbfd796445f5 Parents: 7c852a5 Author: aadamchik <aadamc...@apache.org> Authored: Sat Nov 15 13:05:58 2014 +0300 Committer: aadamchik <aadamc...@apache.org> Committed: Sat Nov 15 13:05:58 2014 +0300 ---------------------------------------------------------------------- .../src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cayenne/blob/5f7b6ddf/cayenne-server/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java ---------------------------------------------------------------------- diff --git a/cayenne-server/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java b/cayenne-server/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java index af402b4..1f17aac 100644 --- a/cayenne-server/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java +++ b/cayenne-server/src/main/java/org/apache/cayenne/query/BaseQueryMetadata.java @@ -333,7 +333,7 @@ class BaseQueryMetadata implements QueryMetadata, XMLSerializable, Serializable * @since 3.0 */ void setCacheStrategy(QueryCacheStrategy cacheStrategy) { - this.cacheStrategy = cacheStrategy; + this.cacheStrategy = cacheStrategy != null ? cacheStrategy : QueryCacheStrategy.getDefaultStrategy(); } /**