Skip to content

Commit 12ef194

Browse files
refactor: Replace Arrays.asList with List.of in tests
Use this link to re-run the recipe: https://app.moderne.io/builder/j1pfpwnjZ?organizationId=ODQ2MGExMTUtNDg0My00N2EwLTgzMGMtNGE1NGExMTBmZDkw Co-authored-by: Moderne <[email protected]>
1 parent e566350 commit 12ef194

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/test/java/org/openrewrite/java/spring/amqp/UseTlsAmqpConnectionStringTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import org.openrewrite.test.RecipeSpec;
2121
import org.openrewrite.test.RewriteTest;
2222

23-
import java.util.Arrays;
23+
import java.util.List;
2424

2525
import static org.openrewrite.properties.Assertions.properties;
2626
import static org.openrewrite.yaml.Assertions.yaml;
@@ -189,7 +189,7 @@ void customProperties() {
189189
@Test
190190
void profileSpecific() {
191191
rewriteRun(
192-
spec -> spec.recipe(new UseTlsAmqpConnectionString("my.custom.addresses", 5672, 5671, "my.custom.ssl.enabled", Arrays.asList("**/application*.yml", "**/application*.yaml", "**/application*.properties"))),
192+
spec -> spec.recipe(new UseTlsAmqpConnectionString("my.custom.addresses", 5672, 5671, "my.custom.ssl.enabled", List.of("**/application*.yml", "**/application*.yaml", "**/application*.properties"))),
193193
yaml(
194194
"""
195195
my:

src/test/java/org/openrewrite/java/spring/internal/GeneratePropertiesMigratorConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public static void main(String[] args) throws IOException {
4949
releasesDir.mkdirs();
5050

5151
File[] listing = releasesDir.listFiles();
52-
Set<String> latestPatchReleases = Arrays.asList(args).contains("offline") ?
52+
Set<String> latestPatchReleases = List.of(args).contains("offline") ?
5353
(listing == null ? emptySet() :
5454
Arrays.stream(listing).map(File::getName).collect(toSet())) :
5555
springBootReleases.latestPatchReleases();

src/test/java/org/openrewrite/java/spring/internal/SpringBootReleases.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public SpringBootReleases(boolean includeReleaseCandidates) {
4242
this.includeReleaseCandidates = includeReleaseCandidates;
4343
}
4444
public Stream<ModuleDownload> download(String version) {
45-
List<String> denyList = Arrays.asList("sample", "gradle", "experimental", "legacy",
45+
List<String> denyList = List.of("sample", "gradle", "experimental", "legacy",
4646
"maven", "tests", "spring-boot-versions");
4747
HttpUrlConnectionSender httpSender = new HttpUrlConnectionSender();
4848

0 commit comments

Comments
 (0)