Skip to content

Commit 04cf4ee

Browse files
committed
Comment: Remove unnecessary Latin acronym
1 parent fe496cb commit 04cf4ee

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

src/main/java/org/apache/commons/csv/CSVFormat.java

+10-10
Original file line numberDiff line numberDiff line change
@@ -1476,7 +1476,7 @@ private static boolean isLineBreak(final char c) {
14761476
* @return true if {@code c} is a line break character (and not null).
14771477
*/
14781478
private static boolean isLineBreak(final Character c) {
1479-
return c != null && isLineBreak(c.charValue()); // N.B. Explicit (un)boxing is intentional
1479+
return c != null && isLineBreak(c.charValue()); // Explicit (un)boxing is intentional
14801480
}
14811481

14821482
/** Same test as in as {@link String#trim()}. */
@@ -1697,7 +1697,7 @@ public boolean equals(final Object obj) {
16971697
}
16981698

16991699
private void escape(final char c, final Appendable appendable) throws IOException {
1700-
append(escapeCharacter.charValue(), appendable); // N.B. Explicit (un)boxing is intentional
1700+
append(escapeCharacter.charValue(), appendable); // Explicit (un)boxing is intentional
17011701
append(c, appendable);
17021702
}
17031703

@@ -1835,7 +1835,7 @@ public DuplicateHeaderMode getDuplicateHeaderMode() {
18351835
* @return the escape character, may be {@code 0}
18361836
*/
18371837
char getEscapeChar() {
1838-
return escapeCharacter != null ? escapeCharacter.charValue() : 0; // N.B. Explicit (un)boxing is intentional
1838+
return escapeCharacter != null ? escapeCharacter.charValue() : 0; // Explicit (un)boxing is intentional
18391839
}
18401840

18411841
/**
@@ -2161,15 +2161,15 @@ private void print(final InputStream inputStream, final Appendable out, final bo
21612161
}
21622162
final boolean quoteCharacterSet = isQuoteCharacterSet();
21632163
if (quoteCharacterSet) {
2164-
append(getQuoteCharacter().charValue(), out); // N.B. Explicit (un)boxing is intentional
2164+
append(getQuoteCharacter().charValue(), out); // Explicit (un)boxing is intentional
21652165
}
21662166
// Stream the input to the output without reading or holding the whole value in memory.
21672167
// AppendableOutputStream cannot "close" an Appendable.
21682168
try (OutputStream outputStream = new Base64OutputStream(new AppendableOutputStream<>(out))) {
21692169
IOUtils.copy(inputStream, outputStream);
21702170
}
21712171
if (quoteCharacterSet) {
2172-
append(getQuoteCharacter().charValue(), out); // N.B. Explicit (un)boxing is intentional
2172+
append(getQuoteCharacter().charValue(), out); // Explicit (un)boxing is intentional
21732173
}
21742174
}
21752175

@@ -2418,7 +2418,7 @@ private void printWithQuotes(final Object object, final CharSequence charSeq, fi
24182418
final int len = charSeq.length();
24192419
final char[] delim = getDelimiterCharArray();
24202420
final int delimLength = delim.length;
2421-
final char quoteChar = getQuoteCharacter().charValue(); // N.B. Explicit (un)boxing is intentional
2421+
final char quoteChar = getQuoteCharacter().charValue(); // Explicit (un)boxing is intentional
24222422
// If escape char not specified, default to the quote char
24232423
// This avoids having to keep checking whether there is an escape character
24242424
// at the cost of checking against quote twice
@@ -2521,7 +2521,7 @@ private void printWithQuotes(final Reader reader, final Appendable appendable) t
25212521
printWithEscapes(reader, appendable);
25222522
return;
25232523
}
2524-
final char quote = getQuoteCharacter().charValue(); // N.B. Explicit (un)boxing is intentional
2524+
final char quote = getQuoteCharacter().charValue(); // Explicit (un)boxing is intentional
25252525
// (1) Append opening quote
25262526
append(quote, appendable);
25272527
// (2) Append Reader contents, doubling quotes
@@ -2610,13 +2610,13 @@ private void validate() throws IllegalArgumentException {
26102610
if (containsLineBreak(delimiter)) {
26112611
throw new IllegalArgumentException("The delimiter cannot be a line break");
26122612
}
2613-
if (quoteCharacter != null && contains(delimiter, quoteCharacter.charValue())) { // N.B. Explicit (un)boxing is intentional
2613+
if (quoteCharacter != null && contains(delimiter, quoteCharacter.charValue())) { // Explicit (un)boxing is intentional
26142614
throw new IllegalArgumentException("The quoteChar character and the delimiter cannot be the same ('" + quoteCharacter + "')");
26152615
}
2616-
if (escapeCharacter != null && contains(delimiter, escapeCharacter.charValue())) { // N.B. Explicit (un)boxing is intentional
2616+
if (escapeCharacter != null && contains(delimiter, escapeCharacter.charValue())) { // Explicit (un)boxing is intentional
26172617
throw new IllegalArgumentException("The escape character and the delimiter cannot be the same ('" + escapeCharacter + "')");
26182618
}
2619-
if (commentMarker != null && contains(delimiter, commentMarker.charValue())) { // N.B. Explicit (un)boxing is intentional
2619+
if (commentMarker != null && contains(delimiter, commentMarker.charValue())) { // Explicit (un)boxing is intentional
26202620
throw new IllegalArgumentException("The comment start character and the delimiter cannot be the same ('" + commentMarker + "')");
26212621
}
26222622
if (quoteCharacter != null && quoteCharacter.equals(commentMarker)) {

src/main/java/org/apache/commons/csv/CSVParser.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,7 @@ private Headers createHeaders() throws IOException {
650650
}
651651
observedMissing |= blankHeader;
652652
if (header != null) {
653-
hdrMap.put(header, Integer.valueOf(i)); // N.B. Explicit (un)boxing is intentional
653+
hdrMap.put(header, Integer.valueOf(i)); // Explicit (un)boxing is intentional
654654
if (headerNames == null) {
655655
headerNames = new ArrayList<>(headerRecord.length);
656656
}

src/main/java/org/apache/commons/csv/CSVPrinter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ public synchronized void printComment(final String comment) throws IOException {
228228
if (!newRecord) {
229229
println();
230230
}
231-
appendable.append(format.getCommentMarker().charValue()); // N.B. Explicit (un)boxing is intentional
231+
appendable.append(format.getCommentMarker().charValue()); // Explicit (un)boxing is intentional
232232
appendable.append(SP);
233233
for (int i = 0; i < comment.length(); i++) {
234234
final char c = comment.charAt(i);
@@ -240,7 +240,7 @@ public synchronized void printComment(final String comment) throws IOException {
240240
// falls-through: break intentionally excluded.
241241
case LF:
242242
println();
243-
appendable.append(format.getCommentMarker().charValue()); // N.B. Explicit (un)boxing is intentional
243+
appendable.append(format.getCommentMarker().charValue()); // Explicit (un)boxing is intentional
244244
appendable.append(SP);
245245
break;
246246
default:

src/main/java/org/apache/commons/csv/CSVRecord.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ public String get(final String name) {
134134
headerMap.keySet()));
135135
}
136136
try {
137-
return values[index.intValue()]; // N.B. Explicit (un)boxing is intentional
137+
return values[index.intValue()]; // Explicit (un)boxing is intentional
138138
} catch (final ArrayIndexOutOfBoundsException e) {
139139
throw new IllegalArgumentException(String.format(
140140
"Index for header '%s' is %d but CSVRecord only has %d values!", name, index,
141-
Integer.valueOf(values.length))); // N.B. Explicit (un)boxing is intentional
141+
Integer.valueOf(values.length))); // Explicit (un)boxing is intentional
142142
}
143143
}
144144

@@ -267,7 +267,7 @@ public boolean isSet(final int index) {
267267
* @return whether a given column is mapped and has a value
268268
*/
269269
public boolean isSet(final String name) {
270-
return isMapped(name) && getHeaderMapRaw().get(name).intValue() < values.length; // N.B. Explicit (un)boxing is intentional
270+
return isMapped(name) && getHeaderMapRaw().get(name).intValue() < values.length; // Explicit (un)boxing is intentional
271271
}
272272

273273
/**

0 commit comments

Comments
 (0)