From 6cf0111ab9c845efe18825c04124ec272a19fb06 Mon Sep 17 00:00:00 2001 From: Sam Snyder Date: Thu, 25 Apr 2024 16:54:11 -0700 Subject: [PATCH] Use JavaParser.runtimeClasspath() not because it is better, but because I want to see if this will still work on the saas. Will revert this change either way. --- .../apache/httpclient4/MigrateDefaultHttpClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/org/openrewrite/apache/httpclient4/MigrateDefaultHttpClient.java b/src/main/java/org/openrewrite/apache/httpclient4/MigrateDefaultHttpClient.java index 05ccbc5..d80a753 100644 --- a/src/main/java/org/openrewrite/apache/httpclient4/MigrateDefaultHttpClient.java +++ b/src/main/java/org/openrewrite/apache/httpclient4/MigrateDefaultHttpClient.java @@ -53,7 +53,7 @@ public TreeVisitor getVisitor() { return Preconditions.check(new UsesType<>("org.apache.http.impl.client.DefaultHttpClient", false), new JavaVisitor() { final MethodMatcher noArgsMatcher = new MethodMatcher("org.apache.http.impl.client.DefaultHttpClient ()"); final JavaTemplate noArgsTemplate = JavaTemplate.builder("HttpClients.createDefault()") - .javaParser(JavaParser.fromJavaVersion().classpath("httpclient")) + .javaParser(JavaParser.fromJavaVersion().classpath(JavaParser.runtimeClasspath())) .imports("org.apache.http.impl.client.HttpClients") .build();