mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
[javadoc] Remove java 9 APIs in JavaDocFragmentAnchorCache
IJ-MR-174748 GitOrigin-RevId: b7067cdd80f4f0ec37289a98271b67e29b007646
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c6ac8622b9
commit
03ed50736e
+10
-9
@@ -52,16 +52,17 @@ private class JavaDocFragmentCacheService {
|
||||
}
|
||||
|
||||
private fun findIdsFromText(docText: String): List<JavaDocFragmentData> {
|
||||
return ID_PATTERN.matcher(docText).results()
|
||||
.map { result ->
|
||||
val id = result.group(1)
|
||||
when (id != null && !id.isBlank()) {
|
||||
true -> JavaDocFragmentData(id, result.start(1))
|
||||
false -> null
|
||||
}
|
||||
val results = ArrayList<JavaDocFragmentData>()
|
||||
val matcher = ID_PATTERN.matcher(docText)
|
||||
|
||||
while (matcher.find()) {
|
||||
val id = matcher.group(1)
|
||||
if (id != null && !id.isBlank()) {
|
||||
results.add(JavaDocFragmentData(id, matcher.start(1)))
|
||||
}
|
||||
.toList()
|
||||
.filterNotNull()
|
||||
}
|
||||
|
||||
return results
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user