Skip to content

Commit 3a46ac4

Browse files
committed
ICU-23054 Fix all 'AlmostJavadoc' errorprone issues (for real this time)
1 parent bb9900a commit 3a46ac4

File tree

6 files changed

+128
-152
lines changed

6 files changed

+128
-152
lines changed

icu4j/main/charset/src/main/java/com/ibm/icu/charset/CharsetISO2022.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ private int MBCSSimpleGetNextUChar(UConverterSharedData sharedData,
265265
return returnValue;
266266
}
267267

268-
/*
268+
/**
269269
* @param is the output byte
270270
* @return 1 roundtrip byte 0 no mapping -1 fallback byte
271271
*/

icu4j/main/charset/src/main/java/com/ibm/icu/charset/CharsetMBCS.java

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -918,27 +918,28 @@ protected void initializeConverter(int myOptions) {
918918
}
919919
}
920920
}
921-
/* EBCDIC swap LF<->NL--------------------------------------------------------------------------------*/
922-
/*
923-
* This code modifies a standard EBCDIC<->Unicode mappling table for
924-
* OS/390 (z/OS) Unix System Services (Open Edition).
925-
* The difference is in the mapping of Line Feed and New Line control codes:
926-
* Standard EBDIC maps
927-
*
928-
* <U000A> \x25 |0
929-
* <U0085> \x15 |0
930-
*
931-
* but OS/390 USS EBCDIC swaps the control codes for LF and NL,
932-
* mapping
933-
*
934-
* <U000A> \x15 |0
935-
* <U0085> \x25 |0
936-
*
937-
* This code modifies a loaded standard EBCDIC<->Unicode mapping table
938-
* by copying it into allocated memory and swapping the LF and NL values.
939-
* It allows to support the same EBCDIC charset in both version without
940-
* duplicating the entire installed table.
941-
*/
921+
922+
// EBCDIC swap LF<->NL
923+
//
924+
// This code modifies a standard EBCDIC<->Unicode mappling table for
925+
// OS/390 (z/OS) Unix System Services (Open Edition).
926+
// The difference is in the mapping of Line Feed and New Line control codes:
927+
// Standard EBDIC maps
928+
//
929+
// <U000A> \x25 |0
930+
// <U0085> \x15 |0
931+
//
932+
// but OS/390 USS EBCDIC swaps the control codes for LF and NL,
933+
// mapping
934+
//
935+
// <U000A> \x15 |0
936+
// <U0085> \x25 |0
937+
//
938+
// This code modifies a loaded standard EBCDIC<->Unicode mapping table
939+
// by copying it into allocated memory and swapping the LF and NL values.
940+
// It allows to support the same EBCDIC charset in both version without
941+
// duplicating the entire installed table.
942+
942943
/* standard EBCDIC codes */
943944
private static final short EBCDIC_LF = 0x0025;
944945
private static final short EBCDIC_NL = 0x0015;
@@ -1415,13 +1416,13 @@ static int FROM_U(CharBuffer stage12, CharBuffer stage3, int s1Index, int c) {
14151416
static final int FROM_U_RESERVED_MASK = 0x60000000;
14161417
private static final int FROM_U_DATA_MASK = 0xffffff;
14171418

1418-
/* special value for "no mapping" to <subchar1> (impossible roundtrip to 0 bytes, value 01) */
1419+
// special value for "no mapping" to <subchar1> (impossible roundtrip to 0 bytes, value 01)
14191420
static final int FROM_U_SUBCHAR1 = 0x80000001;
14201421

1421-
/* at most 3 bytes in the lower part of the value */
1422+
// at most 3 bytes in the lower part of the value
14221423
private static final int FROM_U_MAX_DIRECT_LENGTH = 3;
14231424

1424-
/* maximum number of indexed bytes */
1425+
// maximum number of indexed bytes
14251426
static final int MAX_BYTES = 0x1f;
14261427

14271428
static boolean FROM_U_IS_PARTIAL(int value) {
@@ -1477,7 +1478,7 @@ private static int GET_MAX_BYTES_PER_UCHAR(ByteBuffer indexes) {
14771478
return indexes.getInt(EXT_COUNT_BYTES) & 0xff;
14781479
}
14791480

1480-
/*
1481+
/**
14811482
* @return index of the UChar, if found; else <0
14821483
*/
14831484
static int findFromU(CharBuffer fromUSection, int length, char u) {
@@ -1525,7 +1526,7 @@ static int findFromU(CharBuffer fromUSection, int length, char u) {
15251526
}
15261527
}
15271528

1528-
/*
1529+
/**
15291530
* @return lookup value for the byte, if found; else 0
15301531
*/
15311532
static int findToU(IntBuffer toUSection, int length, short byt) {
@@ -1870,10 +1871,9 @@ private CoderResult toUWriteCodePoint(int c, CharBuffer target, IntBuffer offset
18701871
return cr;
18711872
}
18721873

1873-
/*
1874-
* Input sequence: cnv->toUBytes[0..length[ @return if(U_FAILURE) return the length (toULength, byteIndex) for
1875-
* the input else return 0 after output has been written to the target
1876-
*/
1874+
// Input sequence: cnv->toUBytes[0..length[ @return if(U_FAILURE) return the length (toULength, byteIndex) for
1875+
// the input else return 0 after output has been written to the target
1876+
//
18771877
private int toU(int length, ByteBuffer source, CharBuffer target, IntBuffer offsets, int sourceIndex,
18781878
boolean flush, CoderResult[] cr) {
18791879
// ByteBuffer cx;
@@ -3875,7 +3875,7 @@ private CoderResult writeFromU(int value, ByteBuffer target, IntBuffer offsets,
38753875
return fromUWriteBytes(this, resultArray, resultArrayIndex, length, target, offsets, srcIndex);
38763876
}
38773877

3878-
/*
3878+
/**
38793879
* @return if(U_FAILURE) return the code point for cnv->fromUChar32 else return 0 after output has been written
38803880
* to the target
38813881
*/

icu4j/main/core/src/main/java/com/ibm/icu/impl/UCaseProps.java

Lines changed: 31 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ private static final byte slotOffset(int flags, int index) {
146146
return flagsOffset[flags&((1<<index)-1)];
147147
}
148148

149-
/*
149+
/**
150150
* Get the value of an optional-value slot where hasSlot(excWord, index).
151151
*
152152
* @param excWord (in) initial exceptions word
@@ -959,39 +959,36 @@ private final boolean isPrecededBySoftDotted(ContextIterator iter) {
959959
return false; /* not preceded by TYPE_i */
960960
}
961961

962-
/*
963-
* See Jitterbug 2344:
964-
* The condition After_I for Turkic-lowercasing of U+0307 combining dot above
965-
* is checked in ICU 2.0, 2.1, 2.6 but was not in 2.2 & 2.4 because
966-
* we made those releases compatible with Unicode 3.2 which had not fixed
967-
* a related bug in SpecialCasing.txt.
968-
*
969-
* From the Jitterbug 2344 text:
970-
* ... this bug is listed as a Unicode erratum
971-
* from 2002-10-31 at http://www.unicode.org/uni2errata/UnicodeErrata.html
972-
* <quote>
973-
* There are two errors in SpecialCasing.txt.
974-
* 1. Missing semicolons on two lines. ... [irrelevant for ICU]
975-
* 2. An incorrect context definition. Correct as follows:
976-
* < 0307; ; 0307; 0307; tr After_Soft_Dotted; # COMBINING DOT ABOVE
977-
* < 0307; ; 0307; 0307; az After_Soft_Dotted; # COMBINING DOT ABOVE
978-
* ---
979-
* > 0307; ; 0307; 0307; tr After_I; # COMBINING DOT ABOVE
980-
* > 0307; ; 0307; 0307; az After_I; # COMBINING DOT ABOVE
981-
* where the context After_I is defined as:
982-
* The last preceding base character was an uppercase I, and there is no
983-
* intervening combining character class 230 (ABOVE).
984-
* </quote>
985-
*
986-
* Note that SpecialCasing.txt even in Unicode 3.2 described the condition as:
987-
*
988-
* # When lowercasing, remove dot_above in the sequence I + dot_above, which will turn into i.
989-
* # This matches the behavior of the canonically equivalent I-dot_above
990-
*
991-
* See also the description in this place in older versions of uchar.c (revision 1.100).
992-
*
993-
* Markus W. Scherer 2003-feb-15
994-
*/
962+
// See Jitterbug 2344:
963+
// The condition After_I for Turkic-lowercasing of U+0307 combining dot above
964+
// is checked in ICU 2.0, 2.1, 2.6 but was not in 2.2 & 2.4 because
965+
// we made those releases compatible with Unicode 3.2 which had not fixed
966+
// a related bug in SpecialCasing.txt.
967+
//
968+
// From the Jitterbug 2344 text:
969+
// ... this bug is listed as a Unicode erratum
970+
// from 2002-10-31 at http://www.unicode.org/uni2errata/UnicodeErrata.html
971+
//
972+
// There are two errors in SpecialCasing.txt.
973+
// 1. Missing semicolons on two lines. ... [irrelevant for ICU]
974+
// 2. An incorrect context definition. Correct as follows:
975+
// < 0307; ; 0307; 0307; tr After_Soft_Dotted; # COMBINING DOT ABOVE
976+
// < 0307; ; 0307; 0307; az After_Soft_Dotted; # COMBINING DOT ABOVE
977+
// ---
978+
// > 0307; ; 0307; 0307; tr After_I; # COMBINING DOT ABOVE
979+
// > 0307; ; 0307; 0307; az After_I; # COMBINING DOT ABOVE
980+
// where the context After_I is defined as:
981+
// The last preceding base character was an uppercase I, and there is no
982+
// intervening combining character class 230 (ABOVE).
983+
//
984+
// Note that SpecialCasing.txt even in Unicode 3.2 described the condition as:
985+
//
986+
// # When lowercasing, remove dot_above in the sequence I + dot_above, which will turn into i.
987+
// # This matches the behavior of the canonically equivalent I-dot_above
988+
//
989+
// See also the description in this place in older versions of uchar.c (revision 1.100).
990+
//
991+
// Markus W. Scherer 2003-feb-15
995992

996993
/* Is preceded by base character 'I' with no intervening cc=230 ? */
997994
private final boolean isPrecededBy_I(ContextIterator iter) {

0 commit comments

Comments
 (0)