Skip to content

Commit

Permalink
Upgrade spotless to 6.9.1, google java format to 1.23.0. (#13661)
Browse files Browse the repository at this point in the history
  • Loading branch information
dweiss authored Aug 16, 2024
1 parent af22fe9 commit f99deb5
Show file tree
Hide file tree
Showing 39 changed files with 360 additions and 312 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ private void check(Element element) {
case PACKAGE:
checkComment(element);
break;
// class-like elements, check them, then recursively check their children (fields and
// methods)
// class-like elements, check them, then recursively check their children (fields and
// methods)
case CLASS:
case INTERFACE:
case ENUM:
Expand All @@ -257,7 +257,7 @@ && level(element) >= METHOD) {
}
}
break;
// method-like elements, check them if we are configured to do so
// method-like elements, check them if we are configured to do so
case METHOD:
case CONSTRUCTOR:
case FIELD:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"gradle/generation/jflex/skeleton.default.txt": "58944f66c9113a940dfaf6a17210ec8219024390",
"lucene/analysis/common/src/java/org/apache/lucene/analysis/classic/ClassicTokenizerImpl.java": "1f7a446f3483326385eef257cea8366c27da0850",
"lucene/analysis/common/src/java/org/apache/lucene/analysis/classic/ClassicTokenizerImpl.java": "e62dcd8c25219d8f5d783823b228ffe38d2bacde",
"lucene/analysis/common/src/java/org/apache/lucene/analysis/classic/ClassicTokenizerImpl.jflex": "f52109bb7d5701979fde90aeeeda726246a8d5fd"
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"gradle/generation/jflex/skeleton.default.txt": "58944f66c9113a940dfaf6a17210ec8219024390",
"lucene/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizerImpl.java": "ac298e08bc5b96202efca0c01f9f0376fda976bd",
"lucene/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizerImpl.java": "2b5df5ff35543a6380c82f298225eb5fa06e4453",
"lucene/analysis/common/src/java/org/apache/lucene/analysis/wikipedia/WikipediaTokenizerImpl.jflex": "0b8c7774b98e8237702013e82c352d4711509bd0"
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,23 @@ int normalize(char[] s, int len) {

for (int i = 0; i < len; i++) {
switch (s[i]) {
// delete Chandrabindu
// delete Chandrabindu
case '\u0981':
len = delete(s, i, len);
i--;
break;

// DirghoI kar -> RosshoI kar
// DirghoI kar -> RosshoI kar
case '\u09C0':
s[i] = '\u09BF';
break;

// DirghoU kar -> RosshoU kar
// DirghoU kar -> RosshoU kar
case '\u09C2':
s[i] = '\u09C1';
break;

// Khio (Ka + Hoshonto + Murdorno Sh)
// Khio (Ka + Hoshonto + Murdorno Sh)
case '\u0995':
if (i + 2 < len && s[i + 1] == '\u09CD' && s[i + 2] == '\u09BF') {
if (i == 0) {
Expand All @@ -67,12 +67,12 @@ int normalize(char[] s, int len) {
}
break;

// Nga to Anusvara
// Nga to Anusvara
case '\u0999':
s[i] = '\u0982';
break;

// Ja Phala
// Ja Phala
case '\u09AF':
if (i - 2 == 0 && s[i - 1] == '\u09CD') {
s[i - 1] = '\u09C7';
Expand All @@ -89,7 +89,7 @@ int normalize(char[] s, int len) {
}
break;

// Ba Phalaa
// Ba Phalaa
case '\u09AC':
if ((i >= 1 && s[i - 1] != '\u09CD') || i == 0) {
break;
Expand All @@ -109,7 +109,7 @@ int normalize(char[] s, int len) {
}
break;

// Visarga
// Visarga
case '\u0983':
if (i == len - 1) {
if (len <= 3) {
Expand All @@ -122,18 +122,18 @@ int normalize(char[] s, int len) {
}
break;

// All sh
// All sh
case '\u09B6':
case '\u09B7':
s[i] = '\u09B8';
break;

// check na
// check na
case '\u09A3':
s[i] = '\u09A8';
break;

// check ra
// check ra
case '\u09DC':
case '\u09DD':
s[i] = '\u09B0';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -747,70 +747,70 @@ public int getNextToken() throws java.io.IOException {
/* Break so we don't hit fall-through warning: */
break; /* ignore */
}
// fall through
// fall through
case 11:
break;
case 2:
{
return ALPHANUM;
}
// fall through
// fall through
case 12:
break;
case 3:
{
return CJ;
}
// fall through
// fall through
case 13:
break;
case 4:
{
return NUM;
}
// fall through
// fall through
case 14:
break;
case 5:
{
return HOST;
}
// fall through
// fall through
case 15:
break;
case 6:
{
return COMPANY;
}
// fall through
// fall through
case 16:
break;
case 7:
{
return APOSTROPHE;
}
// fall through
// fall through
case 17:
break;
case 8:
{
return ACRONYM_DEP;
}
// fall through
// fall through
case 18:
break;
case 9:
{
return ACRONYM;
}
// fall through
// fall through
case 19:
break;
case 10:
{
return EMAIL;
}
// fall through
// fall through
case 20:
break;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,18 @@ public boolean incrementToken() throws IOException {

private int lowerCase(int codepoint) {
switch (codepoint) {
/* There are two lowercase forms of sigma:
* U+03C2: small final sigma (end of word)
* U+03C3: small sigma (otherwise)
*
* Standardize both to U+03C3
*/
/* There are two lowercase forms of sigma:
* U+03C2: small final sigma (end of word)
* U+03C3: small sigma (otherwise)
*
* Standardize both to U+03C3
*/
case '\u03C2': /* small final sigma */
return '\u03C3'; /* small sigma */

/* Some greek characters contain diacritics.
* This filter removes these, converting to the lowercase base form.
*/
/* Some greek characters contain diacritics.
* This filter removes these, converting to the lowercase base form.
*/

case '\u0386': /* capital alpha with tonos */
case '\u03AC': /* small alpha with tonos */
Expand Down Expand Up @@ -100,9 +100,9 @@ private int lowerCase(int codepoint) {
case '\u03CE': /* small omega with tonos */
return '\u03C9'; /* small omega */

/* The previous implementation did the conversion below.
* Only implemented for backwards compatibility with old indexes.
*/
/* The previous implementation did the conversion below.
* Only implemented for backwards compatibility with old indexes.
*/

case '\u03A2': /* reserved */
return '\u03C2'; /* small final sigma */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ private final void step5() {
/* j >= 0 fixes Bug 2 */
if (ends("ou")) break;
return;
/* takes care of -ous */
/* takes care of -ous */
case 's':
if (ends("ism")) break;
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ private boolean isUpperVowel(int v) {
case 'I':
case 'O':
case 'U':
// vowels with acute accent (fada)
// vowels with acute accent (fada)
case '\u00c1':
case '\u00c9':
case '\u00cd':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@ int normalize(char[] s, int len) {

for (int i = 0; i < len; i++) {
switch (s[i]) {
// dead n -> bindu
// dead n -> bindu
case '\u0928':
if (i + 1 < len && s[i + 1] == '\u094D') {
s[i] = '\u0902';
len = delete(s, i + 1, len);
}
break;
// candrabindu -> bindu
// candrabindu -> bindu
case '\u0901':
s[i] = '\u0902';
break;
// nukta deletions
// nukta deletions
case '\u093C':
len = delete(s, i, len);
i--;
Expand Down Expand Up @@ -96,18 +96,18 @@ int normalize(char[] s, int len) {
case '\u095F':
s[i] = '\u092F';
break;
// zwj/zwnj -> delete
// zwj/zwnj -> delete
case '\u200D':
case '\u200C':
len = delete(s, i, len);
i--;
break;
// virama -> delete
// virama -> delete
case '\u094D':
len = delete(s, i, len);
i--;
break;
// chandra/short -> replace
// chandra/short -> replace
case '\u0945':
case '\u0946':
s[i] = '\u0947';
Expand All @@ -127,7 +127,7 @@ int normalize(char[] s, int len) {
case '\u0972':
s[i] = '\u0905';
break;
// long -> short ind. vowels
// long -> short ind. vowels
case '\u0906':
s[i] = '\u0905';
break;
Expand All @@ -149,7 +149,7 @@ int normalize(char[] s, int len) {
case '\u0914':
s[i] = '\u0913';
break;
// long -> short dep. vowels
// long -> short dep. vowels
case '\u0940':
s[i] = '\u093F';
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ int type() {

int type = charType(text[current]);
switch (type) {
// return ALPHA word type for both lower and upper
// return ALPHA word type for both lower and upper
case LOWER:
case UPPER:
return ALPHA;
Expand Down Expand Up @@ -332,27 +332,27 @@ public static byte getType(int ch) {
case Character.OTHER_NUMBER:
return DIGIT;

// case Character.SPACE_SEPARATOR:
// case Character.LINE_SEPARATOR:
// case Character.PARAGRAPH_SEPARATOR:
// case Character.CONTROL:
// case Character.FORMAT:
// case Character.PRIVATE_USE:
// case Character.SPACE_SEPARATOR:
// case Character.LINE_SEPARATOR:
// case Character.PARAGRAPH_SEPARATOR:
// case Character.CONTROL:
// case Character.FORMAT:
// case Character.PRIVATE_USE:

case Character.SURROGATE: // prevent splitting
return ALPHA | DIGIT;

// case Character.DASH_PUNCTUATION:
// case Character.START_PUNCTUATION:
// case Character.END_PUNCTUATION:
// case Character.CONNECTOR_PUNCTUATION:
// case Character.OTHER_PUNCTUATION:
// case Character.MATH_SYMBOL:
// case Character.CURRENCY_SYMBOL:
// case Character.MODIFIER_SYMBOL:
// case Character.OTHER_SYMBOL:
// case Character.INITIAL_QUOTE_PUNCTUATION:
// case Character.FINAL_QUOTE_PUNCTUATION:
// case Character.DASH_PUNCTUATION:
// case Character.START_PUNCTUATION:
// case Character.END_PUNCTUATION:
// case Character.CONNECTOR_PUNCTUATION:
// case Character.OTHER_PUNCTUATION:
// case Character.MATH_SYMBOL:
// case Character.CURRENCY_SYMBOL:
// case Character.MODIFIER_SYMBOL:
// case Character.OTHER_SYMBOL:
// case Character.INITIAL_QUOTE_PUNCTUATION:
// case Character.FINAL_QUOTE_PUNCTUATION:

default:
return SUBWORD_DELIM;
Expand Down
Loading

0 comments on commit f99deb5

Please sign in to comment.