Skip to content

Commit

Permalink
Fix format
Browse files Browse the repository at this point in the history
  • Loading branch information
SiBorea committed Nov 28, 2024
1 parent 9b73392 commit cc3ce30
Show file tree
Hide file tree
Showing 2 changed files with 193 additions and 180 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
/*
* Copyright 2024 the original author or authors.
* <p>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p>
* https://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.openrewrite.apache.httpclient5;

import org.openrewrite.*;
Expand Down Expand Up @@ -32,7 +47,6 @@ public J.NewClass visitNewClass(J.NewClass newClass, ExecutionContext ctx) {
newClass = super.visitNewClass(newClass, ctx);
if (TypeUtils.isOfType(newClass.getType(), JavaType.buildType(FQN))) {
newClass = JavaTemplate.builder(newClass.getArguments().get(1).printTrimmed() + ".toCharArray()")
.imports("java.util.Arrays")
.build()
.apply(getCursor(), newClass.getArguments().get(1).getCoordinates().replace());
}
Expand Down
Loading

0 comments on commit cc3ce30

Please sign in to comment.