Skip to content

Commit f72a7fb

Browse files
committed
Improve documentation for trimIndent: add details on null input and return values
1 parent 665d723 commit f72a7fb

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Diff for: springdoc-openapi-starter-common/src/main/java/org/springdoc/core/utils/PropertyResolverUtils.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,11 @@ public String resolve(String parameterProperty, Locale locale) {
115115
* Returns a string where all leading indentation has been removed from each line.
116116
* It detects the smallest common indentation of all the lines in the input string,
117117
* and removes it.
118+
* If the input text is {@code null}, the method returns {@code null}.
118119
*
119-
* @param text The original string with possible leading indentation.
120-
* @return The string with leading indentation removed from each line.
120+
* @param text The original string with possible leading indentation.
121+
* @return The string with the smallest common leading indentation removed from each line,
122+
* or {@code null} if the input text is {@code null}.
121123
*/
122124
public String trimIndent(String text) {
123125
if (text == null) {

0 commit comments

Comments
 (0)