Skip to content

Commit

Permalink
Fix copyright replace bug for Kotlin api generator #1589
Browse files Browse the repository at this point in the history
  • Loading branch information
dengliming committed Jan 14, 2021
1 parent 232a232 commit 121c2f4
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down

0 comments on commit 121c2f4

Please sign in to comment.