Skip to content

Commit fc72f95

Browse files
authored
1 parent ea4ad87 commit fc72f95

File tree

1 file changed

+2
-2
lines changed
  • components/sbm-recipes-jee-to-boot/src/main/java/org/springframework/sbm/jee/jaxrs/recipes

1 file changed

+2
-2
lines changed

components/sbm-recipes-jee-to-boot/src/main/java/org/springframework/sbm/jee/jaxrs/recipes/ReplaceMediaType.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public ReplaceMediaType(Supplier<JavaParser> javaParserSupplier) {
144144
// MediaType(String, String) - present on Spring MediaType
145145
doNext(new RewriteConstructorInvocation(constructorMatcher("javax.ws.rs.core.MediaType", "java.lang.String", "java.lang.String"), (v, m, addImport) -> {
146146
JavaType type = JavaType.buildType("org.springframework.http.MediaType");
147-
return m.withType(type).withConstructorType(m.getConstructorType().withDeclaringType(TypeUtils.asFullyQualified(type)));
147+
return m.withConstructorType(m.getConstructorType().withDeclaringType(TypeUtils.asFullyQualified(type)));
148148
}));
149149

150150
// MediaType(String, String, String) -> MediaType(String, String, Charset)
@@ -162,7 +162,7 @@ public ReplaceMediaType(Supplier<JavaParser> javaParserSupplier) {
162162
// MediaType(String, String, Map<String, String>) - present on Spring MediaType
163163
doNext(new RewriteConstructorInvocation(constructorMatcher("javax.ws.rs.core.MediaType", "java.lang.String", "java.lang.String", "java.util.Map"), (v, m, addImport) -> {
164164
JavaType type = JavaType.buildType("org.springframework.http.MediaType");
165-
return m.withType(type).withConstructorType(m.getConstructorType().withDeclaringType(TypeUtils.asFullyQualified(type)));
165+
return m.withConstructorType(m.getConstructorType().withDeclaringType(TypeUtils.asFullyQualified(type)));
166166
}));
167167

168168
// Type references

0 commit comments

Comments
 (0)