DATAREDIS-1030 - Polishing.
Update Javadoc and remove superfluous afterPropertiesSet call. Original Pull Request: #473
This commit is contained in:
@@ -46,8 +46,7 @@ public class DefaultRedisScript<T> implements RedisScript<T>, InitializingBean {
|
||||
/**
|
||||
* Creates a new {@link DefaultRedisScript}
|
||||
*/
|
||||
public DefaultRedisScript() {
|
||||
}
|
||||
public DefaultRedisScript() {}
|
||||
|
||||
/**
|
||||
* Creates a new {@link DefaultRedisScript}
|
||||
@@ -117,9 +116,9 @@ public class DefaultRedisScript<T> implements RedisScript<T>, InitializingBean {
|
||||
|
||||
/**
|
||||
* @param resultType The script result type. Should be one of Long, Boolean, List, or deserialized value type. Can be
|
||||
* null if the script returns a throw-away status (i.e "OK")
|
||||
* {@literal null} if the script returns a throw-away status (i.e "OK")
|
||||
*/
|
||||
public void setResultType(Class<T> resultType) {
|
||||
public void setResultType(@Nullable Class<T> resultType) {
|
||||
this.resultType = resultType;
|
||||
}
|
||||
|
||||
|
||||
@@ -84,10 +84,11 @@ public interface RedisScript<T> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates new {@link RedisScript} from {@link Resource}.
|
||||
* Creates new {@link RedisScript} (with throw away result) from the given {@link Resource}.
|
||||
*
|
||||
* @param resource must not be {@literal null}.
|
||||
* @return new instance of {@link RedisScript}.
|
||||
* @throws IllegalArgumentException if the required argument is {@literal null}.
|
||||
* @since 2.2
|
||||
*/
|
||||
static <T> RedisScript<T> of(Resource resource) {
|
||||
@@ -96,7 +97,6 @@ public interface RedisScript<T> {
|
||||
|
||||
DefaultRedisScript<T> script = new DefaultRedisScript<>();
|
||||
script.setLocation(resource);
|
||||
script.afterPropertiesSet();
|
||||
|
||||
return script;
|
||||
}
|
||||
@@ -107,6 +107,7 @@ public interface RedisScript<T> {
|
||||
* @param resource must not be {@literal null}.
|
||||
* @param resultType must not be {@literal null}.
|
||||
* @return new instance of {@link RedisScript}.
|
||||
* @throws IllegalArgumentException if any required argument is {@literal null}.
|
||||
* @since 2.2
|
||||
*/
|
||||
static <T> RedisScript<T> of(Resource resource, Class<T> resultType) {
|
||||
@@ -117,7 +118,6 @@ public interface RedisScript<T> {
|
||||
DefaultRedisScript<T> script = new DefaultRedisScript<>();
|
||||
script.setResultType(resultType);
|
||||
script.setLocation(resource);
|
||||
script.afterPropertiesSet();
|
||||
|
||||
return script;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user