From 1d8de76e11bfc1e08bfc72465f740f15ad119e4b Mon Sep 17 00:00:00 2001 From: humengyu Date: Tue, 9 Apr 2024 22:45:19 +0800 Subject: [PATCH] codestyle --- .../java/io/tidb/bigdata/tidb/types/TimestampType.java | 7 +++---- .../java/io/tidb/bigdata/tidb/meta/TiColumnInfoTest.java | 3 +-- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tidb/src/main/java/io/tidb/bigdata/tidb/types/TimestampType.java b/tidb/src/main/java/io/tidb/bigdata/tidb/types/TimestampType.java index 9943980f..1f6827d9 100644 --- a/tidb/src/main/java/io/tidb/bigdata/tidb/types/TimestampType.java +++ b/tidb/src/main/java/io/tidb/bigdata/tidb/types/TimestampType.java @@ -48,9 +48,7 @@ public class TimestampType extends AbstractDateTimeType { public static final MySQLType[] subTypes = new MySQLType[] {MySQLType.TypeTimestamp}; - /** - * Default value for timestamp type is 0000-00-00 00:00:00 - */ + /** Default value for timestamp type is 0000-00-00 00:00:00 */ public static final String TIMESTAMP_NULL_DEFAULT = "0000-00-00 00:00:00"; TimestampType(MySQLType tp) { @@ -97,7 +95,8 @@ protected Timestamp decodeNotNullForBatchWrite(int flag, CodecDataInput cdi) { @Override public Object getOriginDefaultValue(String value, long version) { - // avoid exception: org.joda.time.IllegalFieldValueException: Cannot parse "0000-00-00 00:00:00": Value 0 for monthOfYear must be in the range [1,12] + // avoid exception: org.joda.time.IllegalFieldValueException: Cannot parse "0000-00-00 + // 00:00:00": Value 0 for monthOfYear must be in the range [1,12] if (TIMESTAMP_NULL_DEFAULT.equals(value)) { value = null; } diff --git a/tidb/src/test/java/io/tidb/bigdata/tidb/meta/TiColumnInfoTest.java b/tidb/src/test/java/io/tidb/bigdata/tidb/meta/TiColumnInfoTest.java index 19d4003e..185a0e4d 100644 --- a/tidb/src/test/java/io/tidb/bigdata/tidb/meta/TiColumnInfoTest.java +++ b/tidb/src/test/java/io/tidb/bigdata/tidb/meta/TiColumnInfoTest.java @@ -39,7 +39,6 @@ public void testToProto() { 1, "", false); - assertEquals( - "\000", columnInfo.getOriginDefaultValueAsByteString().toStringUtf8()); + assertEquals("\000", columnInfo.getOriginDefaultValueAsByteString().toStringUtf8()); } }