From 121c2f486d005f19ddb5273d005034ecb4ec0c1f Mon Sep 17 00:00:00 2001 From: dengliming Date: Thu, 14 Jan 2021 10:22:46 +0800 Subject: [PATCH] Fix copyright replace bug for Kotlin api generator #1589 --- .../io/lettuce/apigenerator/KotlinCompilationUnitFactory.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/io/lettuce/apigenerator/KotlinCompilationUnitFactory.java b/src/test/java/io/lettuce/apigenerator/KotlinCompilationUnitFactory.java index 4aee5ddf48..bac20af496 100644 --- a/src/test/java/io/lettuce/apigenerator/KotlinCompilationUnitFactory.java +++ b/src/test/java/io/lettuce/apigenerator/KotlinCompilationUnitFactory.java @@ -106,7 +106,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")); + result.append(license.asString().replaceAll("Copyright ([\\d]{4})-([\\d]{4})", "Copyright 2020-$2")); result.append(license.getNextToken().get().asString()); result.append("\n");