Skip to content

Commit 8d60fd8

Browse files
author
Roshin Rajan Panackal
committed
minor refactoring
1 parent 864f64b commit 8d60fd8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

datamodel/openapi/openapi-generator/src/main/java/com/sap/cloud/sdk/datamodel/openapi/generator/CustomJavaClientCodegen.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,18 +269,17 @@ private void useCreatorsForInterfaceSubtypes( @Nonnull final CodegenModel m )
269269
return;
270270
}
271271
boolean useCreators = false;
272-
final var LIST_TYPE_PREFIX = "List<";
273272
for( final Set<String> candidates : List.of(m.anyOf, m.oneOf) ) {
274273
int nonPrimitives = 0;
275274
final var singleTypes = new HashSet<String>();
276275
final var arrayTypes1D = new HashSet<String>();
277276
final var arrayTypesND = new HashSet<Map<String, String>>();
278277

279278
for( final String candidate : candidates ) {
280-
if( candidate.startsWith(LIST_TYPE_PREFIX) ) {
279+
if( candidate.startsWith("List<") ) {
281280
int depth = 0;
282281
String sub = candidate;
283-
while( sub.startsWith(LIST_TYPE_PREFIX) ) {
282+
while( sub.startsWith("List<") ) {
284283
sub = sub.substring(5, sub.length() - 1);
285284
depth++;
286285
}

0 commit comments

Comments
 (0)