From 971cc8007ad834e4747c5d7efec29b792637333e Mon Sep 17 00:00:00 2001 From: SkyBlaise Date: Thu, 24 Aug 2023 16:07:00 +0800 Subject: [PATCH] switch to jdk 8 methods --- .../java/reposense/authorship/AuthorshipAnalyzerTest.java | 6 ++++-- src/test/java/reposense/template/GitTestTemplate.java | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/test/java/reposense/authorship/AuthorshipAnalyzerTest.java b/src/test/java/reposense/authorship/AuthorshipAnalyzerTest.java index c5ccaa26cb..57d76cf323 100644 --- a/src/test/java/reposense/authorship/AuthorshipAnalyzerTest.java +++ b/src/test/java/reposense/authorship/AuthorshipAnalyzerTest.java @@ -2,6 +2,8 @@ import java.time.LocalDateTime; import java.time.Month; +import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import org.junit.jupiter.api.Assertions; @@ -99,7 +101,7 @@ public void analyzeAuthorship_beforeSinceDate_success() { @Test public void analyzeAuthorship_insideIgnoreCommitList_success() { - config.setIgnoreCommitList(List.of(IGNORE_HASH)); + config.setIgnoreCommitList(Arrays.asList(IGNORE_HASH)); FileInfo fileInfo = analyzeTextFile(TEST_FILENAME); @@ -129,7 +131,7 @@ public void analyzeAuthorship_matchesIgnoreGlob_success() { Author fakeAuthor = config.getAuthor("fakeAuthor", ""); // File was renamed analyzeAuthorshipTest2.java -> analyzeAuthorshipTest1.java, ignore previous file name - fakeAuthor.importIgnoreGlobList(List.of(TEST2_FILENAME)); + fakeAuthor.importIgnoreGlobList(Arrays.asList(TEST2_FILENAME)); FileInfo fileInfo = analyzeTextFile(TEST1_FILENAME); diff --git a/src/test/java/reposense/template/GitTestTemplate.java b/src/test/java/reposense/template/GitTestTemplate.java index 369e0fc0f5..0b530560e0 100644 --- a/src/test/java/reposense/template/GitTestTemplate.java +++ b/src/test/java/reposense/template/GitTestTemplate.java @@ -46,7 +46,7 @@ public class GitTestTemplate { protected static final String TEST_COMMIT_HASH_PARENT = "c5a6dc774e22099cd9ddeb0faff1e75f9cf4f151"; protected static final String SECOND_COMMIT_HASH = "05310e79fe8e54c5096bacc97b886ab24304d12b"; protected static final String MERGE_COMMIT_HASH = "7937ff5334ee45cb51e8cfd83a2237d33568a20c"; - protected static final List MERGE_COMMIT_PARENTS_HASHES = List.of( + protected static final List MERGE_COMMIT_PARENTS_HASHES = Arrays.asList( "22aec0be218b0c71065e65460ab48a2d95c8c681", "271bfbb0f0624481825abd812ff1d27768f9aba0"); protected static final String MAIN_AUTHOR_NAME = "harryggg"; protected static final String FAKE_AUTHOR_NAME = "fakeAuthor";