Skip to content

Commit

Permalink
codecentric#113 Spring fix paths
Browse files Browse the repository at this point in the history
fetch paths from patternsCondition and pathPatternsCondition
  • Loading branch information
aSemy authored Apr 28, 2022
1 parent b8a754f commit ad2803b
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package de.codecentric.hikaku.converters.spring.extensions

import org.springframework.web.servlet.mvc.method.RequestMappingInfo

internal fun RequestMappingInfo.paths(): Set<String> {
return this.patternsCondition?.patterns ?: emptySet()
internal fun RequestMappingInfo.paths(): Set<String> = buildSet {
patternsCondition?.patterns?.let(::addAll)
pathPatternsCondition?.patterns?.map { it.patternString }?.let(::addAll)
}

0 comments on commit ad2803b

Please sign in to comment.