Skip to content

Commit 9941a95

Browse files
committed
fix
1 parent 2d00db2 commit 9941a95

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

modules/openapi-generator/src/main/java/org/openapitools/codegen/DefaultGenerator.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import org.apache.commons.io.IOCase;
3232
import org.apache.commons.lang3.ObjectUtils;
3333
import org.apache.commons.lang3.StringUtils;
34-
import org.apache.commons.lang3.Strings;
3534
import org.openapitools.codegen.api.*;
3635
import org.openapitools.codegen.config.GlobalSettings;
3736
import org.openapitools.codegen.ignore.CodegenIgnoreProcessor;
@@ -61,6 +60,7 @@
6160
import java.util.function.Supplier;
6261
import java.util.stream.Collectors;
6362

63+
import static org.apache.commons.lang3.StringUtils.removeStart;
6464
import static org.openapitools.codegen.CodegenConstants.X_INTERNAL;
6565
import static org.openapitools.codegen.utils.OnceLogger.once;
6666

@@ -1392,7 +1392,7 @@ private void processUserDefinedTemplates() {
13921392
// hack: destination filename in this scenario might be a suffix like Impl.java
13931393
templateExt = userDefinedTemplate.getDestinationFilename();
13941394
} else {
1395-
templateExt = Strings.CS.prependIfMissing(templateExt, ".");
1395+
templateExt = StringUtils.prependIfMissing(templateExt, ".");
13961396
}
13971397
String templateOutputFolder = userDefinedTemplate.getFolder();
13981398
if (!templateOutputFolder.isEmpty()) {
@@ -1994,7 +1994,7 @@ private void generateFilesMetadata(List<File> files) {
19941994
// Some implementations make the output ./c/d which seems to mix the logic
19951995
// as documented for symlinks. So we need to trim any / or ./ from the start,
19961996
// as nobody should be generating into system root and our expectation is no ./
1997-
String relativePath = Strings.CS.removeStart(Strings.CS.removeStart(f.toString(), "." + File.separator), File.separator);
1997+
String relativePath = removeStart(removeStart(f.toString(), "." + File.separator), File.separator);
19981998
if (File.separator.equals("\\")) {
19991999
// ensure that windows outputs same FILES format
20002000
relativePath = relativePath.replace(File.separator, "/");
@@ -2020,7 +2020,7 @@ private void generateFilesMetadata(List<File> files) {
20202020
}
20212021

20222022
private String removeTrailingSlash(String value) {
2023-
return Strings.CS.removeEnd(value, "/");
2023+
return StringUtils.removeEnd(value, "/");
20242024
}
20252025

20262026
}

0 commit comments

Comments
 (0)