Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dengliming committed Jan 14, 2021
1 parent 26db17f commit 758f692
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ interface RedisSortedSetCoroutinesCommands<K : Any, V : Any> {
* @return List<V> array-reply list of elements.
* @since 6.2
*/
suspend fun zdiff(vararg keys: K): Flow<V>
fun zdiff(vararg keys: K): Flow<V>

/**
* Computes the difference between the first and all successive input sorted sets and stores the result in destination.
Expand All @@ -199,7 +199,7 @@ interface RedisSortedSetCoroutinesCommands<K : Any, V : Any> {
* @return List<V> array-reply list of scored values.
* @since 6.2
*/
suspend fun zdiffWithScores(vararg keys: K): Flow<ScoredValue<V>>
fun zdiffWithScores(vararg keys: K): Flow<ScoredValue<V>>

/**
* Increment the score of a member in a sorted set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ internal class RedisSortedSetCoroutinesCommandsImpl<K : Any, V : Any>(internal v

override suspend fun zcount(key: K, range: Range<out Number>): Long? = ops.zcount(key, range).awaitFirstOrNull()

override suspend fun zdiff(vararg keys: K): Flow<V> = ops.zdiff(*keys).asFlow()
override fun zdiff(vararg keys: K): Flow<V> = ops.zdiff(*keys).asFlow()

override suspend fun zdiffstore(destKey: K, vararg srcKeys: K): Long? = ops.zdiffstore(destKey, *srcKeys).awaitFirstOrNull()

override suspend fun zdiffWithScores(vararg keys: K): Flow<ScoredValue<V>> = ops.zdiffWithScores(*keys).asFlow()
override fun zdiffWithScores(vararg keys: K): Flow<ScoredValue<V>> = ops.zdiffWithScores(*keys).asFlow()

override suspend fun zincrby(key: K, amount: Double, member: V): Double? = ops.zincrby(key, amount, member).awaitFirstOrNull()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class KotlinCompilationUnitFactory {
private static final Set<String> SKIP_METHODS = LettuceSets.unmodifiableSet("BaseRedisCommands.reset", "getStatefulConnection");
private static final Set<String> FLOW_METHODS = LettuceSets.unmodifiableSet("dispatch", "geohash", "georadius", "georadiusbymember",
"hgetall", "hkeys", "hmget", "hvals", "keys", "mget", "sdiff", "sinter", "smembers", "smismember", "sort", "srandmember", "sunion",
"xclaim", "xpending", "xrange", "xread", "xreadgroup", "xrevrange", "zinter", "zinterWithScores", "zpopmax", "zpopmin", "zrange",
"xclaim", "xpending", "xrange", "xread", "xreadgroup", "xrevrange", "zdiff", "zdiffWithScores", "zinter", "zinterWithScores", "zpopmax", "zpopmin", "zrange",
"zrangeWithScores", "zrangebylex", "zrangebyscore", "zrangebyscoreWithScores", "zrevrange", "zrevrangeWithScores", "zrevrangebylex",
"zrevrangebyscore", "zrevrangebyscore", "zrevrangebyscoreWithScores", "zunion", "zunionWithScores");

Expand Down Expand Up @@ -111,7 +111,7 @@ public void create() throws Exception {
CompilationUnit template = JavaParser.parse(templateFile);

JavaToken license = template.getTokenRange().get().getBegin();
result.append(license.asString().replaceAll("Copyright [\\d]{4}-[\\d]{4}", "Copyright 2020-$2"));
result.append(license.asString().replaceAll("Copyright ([\\d]{4})-([\\d]{4})", "Copyright 2020-$2"));
result.append(license.getNextToken().get().asString());
result.append("\n");

Expand Down

0 comments on commit 758f692

Please sign in to comment.