Skip to content

Commit fc86418

Browse files
wenshaoqwencoder
andcommitted
Fix trailing whitespace in IOUtils#writeDecimal method comments to pass checkstyle validation
Co-authored-by: Qwen-Coder <[email protected]>
1 parent cfb3fd0 commit fc86418

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

core/src/main/java/com/alibaba/fastjson2/util/IOUtils.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,17 @@ public static void getChars(long i, int index, char[] buf) {
287287
}
288288
}
289289

290+
/**
291+
* Writes a decimal number to a byte array buffer
292+
*
293+
* @param buf byte array buffer
294+
* @param off buffer starting offset
295+
* @param unscaledVal unscaled value (precision part of BigDecimal)
296+
* @param scale number of digits after the decimal point, caller must ensure scale >= 0
297+
* @return offset after writing
298+
*
299+
* Note: This method trusts that the caller has ensured scale >= 0
300+
*/
290301
public static int writeDecimal(byte[] buf, int off, long unscaledVal, int scale) {
291302
if (unscaledVal < 0) {
292303
putByte(buf, off++, (byte) '-');
@@ -331,6 +342,17 @@ public static int writeDecimal(byte[] buf, int off, long unscaledVal, int scale)
331342
return IOUtils.writeInt64(buf, off, unscaledVal);
332343
}
333344

345+
/**
346+
* Writes a decimal number to a character array buffer
347+
*
348+
* @param buf character array buffer
349+
* @param off buffer starting offset
350+
* @param unscaledVal unscaled value (precision part of BigDecimal)
351+
* @param scale number of digits after the decimal point, caller must ensure scale >= 0
352+
* @return offset after writing
353+
*
354+
* Note: This method trusts that the caller has ensured scale >= 0
355+
*/
334356
public static int writeDecimal(char[] buf, int off, long unscaledVal, int scale) {
335357
if (unscaledVal < 0) {
336358
putChar(buf, off++, '-');

0 commit comments

Comments
 (0)