Fix problematic chars in javadoc
Java 11 complains about unescaped ">" characters in javadocs. Also fixed some compiler complaints about javadoc in StringFunctionUtils.
This commit is contained in:
parent
69c2b2d802
commit
e31a877a64
|
@ -69,7 +69,7 @@ public class ExpectedReciprocalRankTests extends ESTestCase {
|
||||||
* 4 | 1 | 0.03125 | 0.078125 | 0.00244140625 |
|
* 4 | 1 | 0.03125 | 0.078125 | 0.00244140625 |
|
||||||
* }</pre>
|
* }</pre>
|
||||||
*
|
*
|
||||||
* err => sum of last column
|
* err = sum of last column
|
||||||
*/
|
*/
|
||||||
public void testERRAt() {
|
public void testERRAt() {
|
||||||
List<RatedDocument> rated = new ArrayList<>();
|
List<RatedDocument> rated = new ArrayList<>();
|
||||||
|
@ -94,7 +94,7 @@ public class ExpectedReciprocalRankTests extends ESTestCase {
|
||||||
* 4 | 1 | 0.03125 | 0.125 | 0.00390625 |
|
* 4 | 1 | 0.03125 | 0.125 | 0.00390625 |
|
||||||
* }</pre>
|
* }</pre>
|
||||||
*
|
*
|
||||||
* err => sum of last column
|
* err = sum of last column
|
||||||
*/
|
*/
|
||||||
public void testERRMissingRatings() {
|
public void testERRMissingRatings() {
|
||||||
List<RatedDocument> rated = new ArrayList<>();
|
List<RatedDocument> rated = new ArrayList<>();
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
package org.elasticsearch.xpack.sql.expression.function.scalar.string;
|
package org.elasticsearch.xpack.sql.expression.function.scalar.string;
|
||||||
|
|
||||||
abstract class StringFunctionUtils {
|
abstract class StringFunctionUtils {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Trims the trailing whitespace characters from the given String. Uses {@link java.lang.Character.isWhitespace(char)}
|
* Trims the trailing whitespace characters from the given String. Uses @link java.lang.Character.isWhitespace(char)
|
||||||
* to determine if a character is whitespace or not.
|
* to determine if a character is whitespace or not.
|
||||||
*
|
*
|
||||||
* @param s the original String
|
* @param s the original String
|
||||||
|
@ -18,16 +18,16 @@ abstract class StringFunctionUtils {
|
||||||
if (!hasLength(s)) {
|
if (!hasLength(s)) {
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder(s);
|
StringBuilder sb = new StringBuilder(s);
|
||||||
while (sb.length() > 0 && Character.isWhitespace(sb.charAt(sb.length() - 1))) {
|
while (sb.length() > 0 && Character.isWhitespace(sb.charAt(sb.length() - 1))) {
|
||||||
sb.deleteCharAt(sb.length() - 1);
|
sb.deleteCharAt(sb.length() - 1);
|
||||||
}
|
}
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Trims the leading whitespace characters from the given String. Uses {@link java.lang.Character.isWhitespace(char)}
|
* Trims the leading whitespace characters from the given String. Uses @link java.lang.Character.isWhitespace(char)
|
||||||
* to determine if a character is whitespace or not.
|
* to determine if a character is whitespace or not.
|
||||||
*
|
*
|
||||||
* @param s the original String
|
* @param s the original String
|
||||||
|
@ -37,7 +37,7 @@ abstract class StringFunctionUtils {
|
||||||
if (!hasLength(s)) {
|
if (!hasLength(s)) {
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
StringBuilder sb = new StringBuilder(s);
|
StringBuilder sb = new StringBuilder(s);
|
||||||
while (sb.length() > 0 && Character.isWhitespace(sb.charAt(0))) {
|
while (sb.length() > 0 && Character.isWhitespace(sb.charAt(0))) {
|
||||||
sb.deleteCharAt(0);
|
sb.deleteCharAt(0);
|
||||||
|
|
Loading…
Reference in New Issue