+ add several fixes

~ fix a potential NPE in RedisTemplate
 ~ add JDK 1.5 source/target compatibility
 ~ fix type in documentation
This commit is contained in:
Costin Leau
2011-07-27 10:48:22 +03:00
parent 85fb62147b
commit fd73e75ad8
5 changed files with 7 additions and 16 deletions

2
.gitignore vendored
View File

@@ -4,9 +4,7 @@ bin
build
.gradle
.springBeans
.ant-targets-build.xml
pom.xml
src/ant/.ant-targets-upload-dist.xml
*.iml
*.ipr
*.iws

View File

@@ -100,8 +100,8 @@ dependencies {
javaprojects = rootProject
sourceCompatibility = 1.6
targetCompatibility = 1.6
sourceCompatibility = 1.5
targetCompatibility = 1.5
javadoc {
srcDir = file("${projectDir}/docs/src/api")

View File

@@ -1,11 +0,0 @@
-breakiterator
-header "Spring Data Redis"
-source 1.6
-protected
-quiet
-docfilessubdirs
-group "Spring Data Redis Support" "org.springframework.data.redis*"
-link http://static.springframework.org/spring/docs/3.0.x/javadoc-api
-link http://download.oracle.com/javase/6/docs/api/
-exclude org.springframework.data.redis.config

View File

@@ -421,7 +421,7 @@
<cache:annotation-driven />
<!-- declare Redis Cache Manager -->
<bean id="cacheManager" class="org.springframework.data.redis.cache.RedisCacheManager" c:template-ref="gemfire-cache">
<bean id="cacheManager" class="org.springframework.data.redis.cache.RedisCacheManager" c:template-ref="redisTemplate">
</beans>]]>
</programlisting>

View File

@@ -698,6 +698,10 @@ public class RedisTemplate<K, V> extends RedisAccessor implements RedisOperation
public <T, S> List<T> sort(SortQuery<K> query, BulkMapper<T, S> bulkMapper, RedisSerializer<S> resultSerializer) {
List<S> values = sort(query, resultSerializer);
if (values == null || values.isEmpty()) {
return Collections.emptyList();
}
int bulkSize = query.getGetPattern().size();
List<T> result = new ArrayList<T>(values.size() / bulkSize + 1);