You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2019/08/28 03:53:42 UTC
[dubbo-go-hessian2] branch master updated: change nil string
pointer value
This is an automated email from the ASF dual-hosted git repository.
alexstocks pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo-go-hessian2.git
The following commit(s) were added to refs/heads/master by this push:
new a5285bf change nil string pointer value
new 90e9c0c Merge pull request #121 from aliiohs/FixStringNullBug
a5285bf is described below
commit a5285bf10f26506b736c1f9933c1f6f2be86c718
Author: aliiohs <rz...@163.com>
AuthorDate: Tue Aug 27 23:45:17 2019 +0800
change nil string pointer value
---
const.go | 2 +-
java_exception/duplicate_format_flags_exception.go | 2 +-
java_exception_test.go | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/const.go b/const.go
index d4ba923..6d51f67 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 0b774c8..48a6fe0 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 6af7841..6b4e137 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")