diff --git a/core/src/test/java/com/devonfw/tools/solicitor/componentinfo/curation/AbstractHierarchicalCurationProviderTest.java b/core/src/test/java/com/devonfw/tools/solicitor/componentinfo/curation/AbstractHierarchicalCurationProviderTest.java index e78481d5..d691eb17 100644 --- a/core/src/test/java/com/devonfw/tools/solicitor/componentinfo/curation/AbstractHierarchicalCurationProviderTest.java +++ b/core/src/test/java/com/devonfw/tools/solicitor/componentinfo/curation/AbstractHierarchicalCurationProviderTest.java @@ -4,7 +4,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; -import java.util.List; +import java.util.Collections; import org.junit.jupiter.api.Test; import org.mockito.Mockito; @@ -161,7 +161,7 @@ protected ComponentInfoCuration fetchCurationFromRepository(String effectiveCura CopyrightCuration cc = new CopyrightCuration(); cc.setOperation(CurationOperation.ADD); cc.setNewCopyright("Copyright " + effectiveCurationDataSelector + " " + pathFragmentWithinRepo); - cic.setCopyrightCurations(List.of(cc)); + cic.setCopyrightCurations(Collections.singletonList(cc)); return cic; } diff --git a/core/src/test/java/com/devonfw/tools/solicitor/componentinfo/curation/CurationUtilTest.java b/core/src/test/java/com/devonfw/tools/solicitor/componentinfo/curation/CurationUtilTest.java index efa4b193..ad0e3791 100644 --- a/core/src/test/java/com/devonfw/tools/solicitor/componentinfo/curation/CurationUtilTest.java +++ b/core/src/test/java/com/devonfw/tools/solicitor/componentinfo/curation/CurationUtilTest.java @@ -6,6 +6,8 @@ import java.io.FileInputStream; import java.io.IOException; +import java.util.Arrays; +import java.util.Collections; import java.util.List; import org.junit.jupiter.api.Test; @@ -63,27 +65,27 @@ void testMerge() { curationFirst.setName("firstName"); curationFirst.setNote("firstNote"); curationFirst.setUrl("firstUrl"); - curationFirst.setExcludedPaths(List.of("first path")); - curationFirst.setCopyrights(List.of("first copyright 1", "first copyright 2")); + curationFirst.setExcludedPaths(Collections.singletonList("first path")); + curationFirst.setCopyrights(Arrays.asList(new String[] { "first copyright 1", "first copyright 2" })); LicenseInfoCuration licFirst = new LicenseInfoCuration(); - curationFirst.setLicenses(List.of(licFirst)); + curationFirst.setLicenses(Collections.singletonList(licFirst)); CopyrightCuration ccFirst = new CopyrightCuration(); - curationFirst.setCopyrightCurations(List.of(ccFirst)); + curationFirst.setCopyrightCurations(Collections.singletonList(ccFirst)); LicenseCuration lcFirst = new LicenseCuration(); - curationFirst.setLicenseCurations(List.of(lcFirst)); + curationFirst.setLicenseCurations(Collections.singletonList(lcFirst)); ComponentInfoCuration curationSecond = new ComponentInfoCuration(); curationSecond.setName("secondName"); curationSecond.setNote("secondNote"); curationSecond.setUrl("secondUrl"); - curationSecond.setExcludedPaths(List.of("second path")); - curationSecond.setCopyrights(List.of("second copyright 1", "second copyright 2")); + curationSecond.setExcludedPaths(Collections.singletonList("second path")); + curationSecond.setCopyrights(Arrays.asList(new String[] { "second copyright 1", "second copyright 2" })); LicenseInfoCuration licSecond = new LicenseInfoCuration(); - curationSecond.setLicenses(List.of(licSecond)); + curationSecond.setLicenses(Collections.singletonList(licSecond)); CopyrightCuration ccSecond = new CopyrightCuration(); - curationSecond.setCopyrightCurations(List.of(ccSecond)); + curationSecond.setCopyrightCurations(Collections.singletonList(ccSecond)); LicenseCuration lcSecond = new LicenseCuration(); - curationSecond.setLicenseCurations(List.of(lcSecond)); + curationSecond.setLicenseCurations(Collections.singletonList(lcSecond)); ComponentInfoCuration merged = CurationUtil.merge(curationFirst, curationSecond); assertEquals("secondName", merged.getName()); @@ -91,10 +93,10 @@ void testMerge() { assertTrue(merged.getNote().contains("/")); assertTrue(merged.getNote().endsWith("firstNote")); assertEquals("secondUrl", merged.getUrl()); - assertTrue(merged.getCopyrights() - .equals(List.of("second copyright 1", "second copyright 2", "first copyright 1", "first copyright 2"))); - assertTrue(merged.getLicenses().equals(List.of(licSecond, licFirst))); - assertTrue(merged.getExcludedPaths().equals(List.of("second path", "first path"))); + assertTrue(merged.getCopyrights().equals(Arrays.asList( + new String[] { "second copyright 1", "second copyright 2", "first copyright 1", "first copyright 2" }))); + assertTrue(merged.getLicenses().equals(Arrays.asList(new LicenseInfoCuration[] { licSecond, licFirst }))); + assertTrue(merged.getExcludedPaths().equals(Arrays.asList(new String[] { "second path", "first path" }))); assertTrue(merged.getLicenseCurations().equals(List.of(lcSecond, lcFirst))); assertTrue(merged.getCopyrightCurations().equals(List.of(ccSecond, ccFirst))); } diff --git a/documentation/master-solicitor.asciidoc b/documentation/master-solicitor.asciidoc index 5582dff3..17955a09 100644 --- a/documentation/master-solicitor.asciidoc +++ b/documentation/master-solicitor.asciidoc @@ -1895,6 +1895,9 @@ Spring beans implementing this interface will be called at certain points in the [appendix] == Release Notes +Changes in 1.24.1:: +* https://github.com/devonfw/solicitor/pull/270: Fixed an incompatibility with JDK 8. + Changes in 1.24.0:: * https://github.com/devonfw/solicitor/issues/263: Some features were pushed from deprecation stage 1 to stage 2, which means they do not longer work with default configuration: repoType attribute, npm and npm-license-crawler readers, REGEX prefix notation, LicenseAssignmentProject.xls. See <> for details. * https://github.com/devonfw/solicitor/pull/265: Added some license name mappings.