Skip to content

Commit

Permalink
Polish
Browse files Browse the repository at this point in the history
  • Loading branch information
wilkinsona committed May 2, 2024
1 parent 16291b0 commit 94c9a5c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 73 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ String getJavaDoc(Element element) {
return getJavaDoc((RecordComponentElement) element);
}
String javadoc = (element != null) ? this.env.getElementUtils().getDocComment(element) : null;
javadoc = (javadoc != null) ? cleanupJavaDoc(javadoc) : null;
javadoc = (javadoc != null) ? cleanUpJavaDoc(javadoc) : null;
return (javadoc == null || javadoc.isEmpty()) ? null : javadoc;
}

Expand Down Expand Up @@ -255,7 +255,7 @@ private String getJavaDoc(RecordComponentElement recordComponent) {
Pattern paramJavadocPattern = paramJavadocPattern(recordComponent.getSimpleName().toString());
Matcher paramJavadocMatcher = paramJavadocPattern.matcher(recordJavadoc);
if (paramJavadocMatcher.find()) {
String paramJavadoc = cleanupJavaDoc(paramJavadocMatcher.group());
String paramJavadoc = cleanUpJavaDoc(paramJavadocMatcher.group());
return paramJavadoc.isEmpty() ? null : paramJavadoc;
}
}
Expand All @@ -267,7 +267,7 @@ private Pattern paramJavadocPattern(String paramName) {
return Pattern.compile(pattern, Pattern.DOTALL);
}

private String cleanupJavaDoc(String javadoc) {
private String cleanUpJavaDoc(String javadoc) {
StringBuilder result = new StringBuilder(javadoc.length());
char lastChar = '.';
for (int i = 0; i < javadoc.length(); i++) {
Expand Down

This file was deleted.

0 comments on commit 94c9a5c

Please sign in to comment.