Skip to content

Commit

Permalink
Return empty string for missing description
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Rusakov authored and sebr72 committed Jan 16, 2025
1 parent 86e8ca2 commit 71f5742
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docs/src/main/groovy/Javadoc7Parser.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ class Javadoc7Parser {
}
}

def firstDescriptionDiv = descDiv.div[0]
return DocsXmlSupport.toXmlString(firstDescriptionDiv)
def description = descDiv.breadthFirst().find {
return it.name() == 'div' && it.@class == 'block'
}

return DocsXmlSupport.toXmlString(description)
} catch (Exception e) {
if (cls.getSuperclass() != null) {
try {
Expand All @@ -55,7 +58,7 @@ class Javadoc7Parser {
throw new IllegalArgumentException(errorHandler(obj, objectName))
}
} else {
throw new IllegalArgumentException(errorHandler(obj, objectName))
return ""
}
}
}
Expand Down

0 comments on commit 71f5742

Please sign in to comment.