Skip to content

Commit

Permalink
Add counter example still handled incorrectly
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek committed Aug 27, 2024
1 parent 518e8bd commit 5aabc5e
Showing 1 changed file with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,47 @@ class Test {
);
}

@Test
void nonRecursiveShouldIgnoreNestedWildcardImport() {
rewriteRun(
spec -> spec.recipe(new ChangePackage(
"com.sun.net.ssl",
"javax.net.ssl",
false)),
//language=java
java(
"""
import com.sun.net.ssl.internal.*;
import com.sun.net.ssl.HostnameVerifier;
class Foo {
com.sun.net.ssl.HostnameVerifier hv;
}
""",
"""
import com.sun.net.ssl.internal.*;
import javax.net.ssl.HostnameVerifier;
class Foo {
javax.net.ssl.HostnameVerifier hv;
}
"""
),
java(
"""
import com.sun.net.ssl.internal.*;
class Bar {
com.sun.net.ssl.HostnameVerifier hv;
}
""",
"""
import com.sun.net.ssl.internal.*;
class Bar {
javax.net.ssl.HostnameVerifier hv;
}
"""
)
);
}

@DocumentExample
@Test
void renameUsingSimplePackageName() {
Expand Down

0 comments on commit 5aabc5e

Please sign in to comment.