File tree 2 files changed +8
-8
lines changed
modules/rank-eval/src/test/java/org/elasticsearch/index/rankeval
x-pack/plugin/sql/src/main/java/org/elasticsearch/xpack/sql/expression/function/scalar/string
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ public void testProbabilityOfRelevance() {
69
69
* 4 | 1 | 0.03125 | 0.078125 | 0.00244140625 |
70
70
* }</pre>
71
71
*
72
- * err => sum of last column
72
+ * err = sum of last column
73
73
*/
74
74
public void testERRAt () {
75
75
List <RatedDocument > rated = new ArrayList <>();
@@ -94,7 +94,7 @@ public void testERRAt() {
94
94
* 4 | 1 | 0.03125 | 0.125 | 0.00390625 |
95
95
* }</pre>
96
96
*
97
- * err => sum of last column
97
+ * err = sum of last column
98
98
*/
99
99
public void testERRMissingRatings () {
100
100
List <RatedDocument > rated = new ArrayList <>();
Original file line number Diff line number Diff line change 6
6
package org .elasticsearch .xpack .sql .expression .function .scalar .string ;
7
7
8
8
abstract class StringFunctionUtils {
9
-
9
+
10
10
/**
11
- * Trims the trailing whitespace characters from the given String. Uses { @link java.lang.Character.isWhitespace(char)}
11
+ * Trims the trailing whitespace characters from the given String. Uses @link java.lang.Character.isWhitespace(char)
12
12
* to determine if a character is whitespace or not.
13
13
*
14
14
* @param s the original String
@@ -18,16 +18,16 @@ static String trimTrailingWhitespaces(String s) {
18
18
if (!hasLength (s )) {
19
19
return s ;
20
20
}
21
-
21
+
22
22
StringBuilder sb = new StringBuilder (s );
23
23
while (sb .length () > 0 && Character .isWhitespace (sb .charAt (sb .length () - 1 ))) {
24
24
sb .deleteCharAt (sb .length () - 1 );
25
25
}
26
26
return sb .toString ();
27
27
}
28
-
28
+
29
29
/**
30
- * Trims the leading whitespace characters from the given String. Uses { @link java.lang.Character.isWhitespace(char)}
30
+ * Trims the leading whitespace characters from the given String. Uses @link java.lang.Character.isWhitespace(char)
31
31
* to determine if a character is whitespace or not.
32
32
*
33
33
* @param s the original String
@@ -37,7 +37,7 @@ static String trimLeadingWhitespaces(String s) {
37
37
if (!hasLength (s )) {
38
38
return s ;
39
39
}
40
-
40
+
41
41
StringBuilder sb = new StringBuilder (s );
42
42
while (sb .length () > 0 && Character .isWhitespace (sb .charAt (0 ))) {
43
43
sb .deleteCharAt (0 );
You can’t perform that action at this time.
0 commit comments