Skip to content

Commit b0c1e2d

Browse files
committed
code review
1 parent 2c86773 commit b0c1e2d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

springdoc-openapi-common/src/main/java/org/springdoc/core/converters/PolymorphicModelConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private Schema composePolymorphicSchema(AnnotatedType type, Schema schema, Colle
6262
String ref = schema.get$ref();
6363
List<Schema> composedSchemas = schemas.stream()
6464
.filter(s -> s instanceof ComposedSchema)
65-
.map(s -> (ComposedSchema) s)
65+
.map(ComposedSchema.class::cast)
6666
.filter(s -> s.getAllOf() != null)
6767
.filter(s -> s.getAllOf().stream().anyMatch(s2 -> ref.equals(s2.get$ref())))
6868
.map(s -> new Schema().$ref(AnnotationsUtils.COMPONENTS_REF + s.getName()))

springdoc-openapi-security/src/main/java/org/springdoc/security/SpringDocSecurityConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ OpenApiCustomiser springSecurityLoginEndpointCustomiser(ApplicationContext appli
115115
Optional<UsernamePasswordAuthenticationFilter> optionalFilter =
116116
filterChain.getFilters().stream()
117117
.filter(filterVar -> filterVar instanceof UsernamePasswordAuthenticationFilter)
118-
.map(filter -> (UsernamePasswordAuthenticationFilter) filter)
118+
.map(UsernamePasswordAuthenticationFilter.class::cast)
119119
.findAny();
120120
if (optionalFilter.isPresent()) {
121121
UsernamePasswordAuthenticationFilter usernamePasswordAuthenticationFilter = optionalFilter.get();

0 commit comments

Comments
 (0)