Skip to content

Commit

Permalink
Merge pull request #121 from aliiohs/FixStringNullBug
Browse files Browse the repository at this point in the history
change nil string pointer value
  • Loading branch information
AlexStocks committed Aug 28, 2019
2 parents 177b9c6 + a5285bf commit 90e9c0c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion const.go
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion java_exception/duplicate_format_flags_exception.go
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions java_exception_test.go
Expand Up @@ -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")
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 90e9c0c

Please sign in to comment.