diff --git a/const.go b/const.go index d4ba9238..6d51f679 100644 --- a/const.go +++ b/const.go @@ -147,7 +147,7 @@ const ( VERSION_KEY = "version" TIMEOUT_KEY = "timeout" - STRING_NIL = "null" + STRING_NIL = "" STRING_TRUE = "true" STRING_FALSE = "false" STRING_ZERO = "0.0" diff --git a/java_exception/duplicate_format_flags_exception.go b/java_exception/duplicate_format_flags_exception.go index 0b774c83..48a6fe0a 100644 --- a/java_exception/duplicate_format_flags_exception.go +++ b/java_exception/duplicate_format_flags_exception.go @@ -24,7 +24,7 @@ type DuplicateFormatFlagsException struct { } func (e DuplicateFormatFlagsException) Error() string { - if e.DetailMessage == "" || e.DetailMessage == "null" { + if e.DetailMessage == "" { return "flags=" + e.Flags } else { return e.DetailMessage + " flags=" + e.Flags diff --git a/java_exception_test.go b/java_exception_test.go index 6af78413..6b4e137d 100644 --- a/java_exception_test.go +++ b/java_exception_test.go @@ -49,8 +49,8 @@ func TestException(t *testing.T) { doTestException(t, "throw_WriteAbortedException", "writeAbortedException") doTestException(t, "throw_InvalidObjectException", "invalidObjectException") doTestException(t, "throw_StreamCorruptedException", "streamCorruptedException") - doTestException(t, "throw_InvalidClassException", "null; invalidClassException") - doTestException(t, "throw_OptionalDataException", "null") + doTestException(t, "throw_InvalidClassException", "invalidClassException") + doTestException(t, "throw_OptionalDataException", "") doTestException(t, "throw_NotActiveException", "notActiveException") doTestException(t, "throw_NotSerializableException", "notSerializableException") doTestException(t, "throw_UTFDataFormatException", "UTFDataFormatException") @@ -97,7 +97,7 @@ func TestException(t *testing.T) { doTestException(t, "throw_UnsupportedTemporalTypeException", "UnsupportedTemporalTypeException") doTestException(t, "throw_ZoneRulesException", "ZoneRulesException") doTestException(t, "throw_DateTimeParseException", "DateTimeParseException") - doTestException(t, "throw_FormatterClosedException", "null") + doTestException(t, "throw_FormatterClosedException", "") doTestException(t, "throw_CancellationException", "CancellationException") doTestException(t, "throw_UnknownFormatConversionException", "Conversion = 'UnknownFormatConversionException'") doTestException(t, "throw_UnknownFormatFlagsException", "Flags = UnknownFormatFlagsException")