You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2021/04/17 09:16:41 UTC

[GitHub] [dubbo-go-hessian2] zhangymPerson opened a new pull request #264: Java.util

zhangymPerson opened a new pull request #264:
URL: https://github.com/apache/dubbo-go-hessian2/pull/264


   <!--  Thanks for sending a pull request! 
   -->
   
   **What this PR does**:
   
   **Which issue(s) this PR fixes**:
   <!--
   *Automatically closes linked issue when PR is merged.
   Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
   _If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
   -->
   Fixes #230 
   
   **Special notes for your reviewer**:add go struct Locale
   
   **Does this PR introduce a user-facing change?**:
   <!--
   If no, just write "NONE" in the release-note block below.
   If yes, a release note is required:
   Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
   -->
   ```release-note
   add go struct Locale
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] codecov-commenter edited a comment on pull request #264: Java.util.Locale support

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #264:
URL: https://github.com/apache/dubbo-go-hessian2/pull/264#issuecomment-821794928


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#264](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (89ace94) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/0d0b7072d6cad1bf8714643e840af4e5967f0ff6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0d0b707) will **increase** coverage by `0.03%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264/graphs/tree.svg?width=650&height=150&src=pr&token=Yh82j7lS1W&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #264      +/-   ##
   ==========================================
   + Coverage   67.40%   67.44%   +0.03%     
   ==========================================
     Files          26       26              
     Lines        2663     2666       +3     
   ==========================================
   + Hits         1795     1798       +3     
     Misses        649      649              
     Partials      219      219              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [java\_util.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-amF2YV91dGlsLmdv) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0d0b707...89ace94](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] wongoo merged pull request #264: Java.util.Locale support

Posted by GitBox <gi...@apache.org>.
wongoo merged pull request #264:
URL: https://github.com/apache/dubbo-go-hessian2/pull/264


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] codecov-commenter edited a comment on pull request #264: Java.util.Locale support

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #264:
URL: https://github.com/apache/dubbo-go-hessian2/pull/264#issuecomment-821794928


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#264](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0a4f22a) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/0d0b7072d6cad1bf8714643e840af4e5967f0ff6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0d0b707) will **increase** coverage by `0.03%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264/graphs/tree.svg?width=650&height=150&src=pr&token=Yh82j7lS1W&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #264      +/-   ##
   ==========================================
   + Coverage   67.40%   67.44%   +0.03%     
   ==========================================
     Files          26       26              
     Lines        2663     2666       +3     
   ==========================================
   + Hits         1795     1798       +3     
     Misses        649      649              
     Partials      219      219              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [java\_util.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-amF2YV91dGlsLmdv) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0d0b707...0a4f22a](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] codecov-commenter commented on pull request #264: Java.util

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #264:
URL: https://github.com/apache/dubbo-go-hessian2/pull/264#issuecomment-821794928


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#264](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (274bf93) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/0d0b7072d6cad1bf8714643e840af4e5967f0ff6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0d0b707) will **increase** coverage by `0.03%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264/graphs/tree.svg?width=650&height=150&src=pr&token=Yh82j7lS1W&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #264      +/-   ##
   ==========================================
   + Coverage   67.40%   67.44%   +0.03%     
   ==========================================
     Files          26       26              
     Lines        2663     2666       +3     
   ==========================================
   + Hits         1795     1798       +3     
     Misses        649      649              
     Partials      219      219              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [java\_util.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-amF2YV91dGlsLmdv) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0d0b707...274bf93](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] zhangymPerson commented on a change in pull request #264: Java.util.Locale support

Posted by GitBox <gi...@apache.org>.
zhangymPerson commented on a change in pull request #264:
URL: https://github.com/apache/dubbo-go-hessian2/pull/264#discussion_r615520393



##########
File path: java_util/locale.go
##########
@@ -0,0 +1,240 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java_util
+
+import "fmt"
+
+// LocaleEnum is Locale enumeration value
+type LocaleEnum int
+
+// Locale object enum
+const (
+	ROOT LocaleEnum = iota
+	ENGLISH
+	FRENCH
+	GERMAN
+	ITALIAN
+	JAPANESE
+	KOREAN
+	CHINESE
+	SIMPLIFIED_CHINESE
+	TRADITIONAL_CHINESE
+	FRANCE
+	GERMANY
+	ITALY
+	JAPAN
+	KOREA
+	CHINA
+	PRC
+	TAIWAN
+	UK
+	US
+	CANADA
+	CANADA_FRENCH
+)
+
+// Locale => java.util.Locale
+type Locale struct {
+	// ID is used to implement enumeration
+	id     LocaleEnum
+	Lang   string
+	County string
+}
+
+func (locale *Locale) String() string {
+	if len(locale.County) != 0 {
+		return fmt.Sprintf("%s_%s", locale.Lang, locale.County)
+	}
+	return locale.Lang
+}
+
+// LocaleHandle => com.alibaba.com.caucho.hessian.io.LocaleHandle object
+type LocaleHandle struct {
+	Value string `hessian:"value"`
+}
+
+func (LocaleHandle) JavaClassName() string {
+	return "com.alibaba.com.caucho.hessian.io.LocaleHandle"
+}
+
+var locales []Locale = make([]Locale, 22, 22)
+
+// init java.util.Locale static object
+func init() {
+	// Useful constant for language.
+	var ENGLISH = Locale{

Review comment:
       ok,i know ,i will revise these questions




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] wongoo commented on a change in pull request #264: Java.util

Posted by GitBox <gi...@apache.org>.
wongoo commented on a change in pull request #264:
URL: https://github.com/apache/dubbo-go-hessian2/pull/264#discussion_r615356520



##########
File path: java_util/locale.go
##########
@@ -0,0 +1,240 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java_util
+
+import "fmt"
+
+// LocaleEnum is Locale enumeration value
+type LocaleEnum int
+
+// Locale object enum
+const (
+	ROOT LocaleEnum = iota
+	ENGLISH
+	FRENCH
+	GERMAN
+	ITALIAN
+	JAPANESE
+	KOREAN
+	CHINESE
+	SIMPLIFIED_CHINESE
+	TRADITIONAL_CHINESE
+	FRANCE
+	GERMANY
+	ITALY
+	JAPAN
+	KOREA
+	CHINA
+	PRC
+	TAIWAN
+	UK
+	US
+	CANADA
+	CANADA_FRENCH
+)
+
+// Locale => java.util.Locale
+type Locale struct {
+	// ID is used to implement enumeration
+	id     LocaleEnum
+	Lang   string
+	County string
+}
+
+func (locale *Locale) String() string {
+	if len(locale.County) != 0 {
+		return fmt.Sprintf("%s_%s", locale.Lang, locale.County)
+	}
+	return locale.Lang
+}
+
+// LocaleHandle => com.alibaba.com.caucho.hessian.io.LocaleHandle object
+type LocaleHandle struct {
+	Value string `hessian:"value"`
+}
+
+func (LocaleHandle) JavaClassName() string {
+	return "com.alibaba.com.caucho.hessian.io.LocaleHandle"
+}
+
+var locales []Locale = make([]Locale, 22, 22)
+
+// init java.util.Locale static object
+func init() {
+	// Useful constant for language.
+	var ENGLISH = Locale{
+		id:     ENGLISH,
+		Lang:   "en",
+		County: "",
+	}
+	// Useful constant for language.
+	var FRENCH = Locale{
+		id:     FRENCH,
+		Lang:   "fr",
+		County: "",
+	}
+	// Useful constant for language.
+	var GERMAN = Locale{
+		id:     GERMAN,
+		Lang:   "de",
+		County: "",
+	}
+	// Useful constant for language.
+	var ITALIAN = Locale{
+		id:     ITALIAN,
+		Lang:   "it",
+		County: "",
+	}
+	// Useful constant for language.
+	var JAPANESE = Locale{
+		id:     JAPANESE,
+		Lang:   "ja",
+		County: "",
+	}
+	// Useful constant for language.
+	var KOREAN = Locale{
+		id:     KOREAN,
+		Lang:   "ko",
+		County: "",
+	}
+	// Useful constant for language.
+	var CHINESE = Locale{
+		id:     CHINESE,
+		Lang:   "zh",
+		County: "",
+	}
+	// Useful constant for language.
+	var SIMPLIFIED_CHINESE = Locale{
+		id:     SIMPLIFIED_CHINESE,
+		Lang:   "zh",
+		County: "CN",
+	}
+	// Useful constant for language.
+	var TRADITIONAL_CHINESE = Locale{
+		id:     TRADITIONAL_CHINESE,
+		Lang:   "zh",
+		County: "TW",
+	}
+	// Useful constant for language.
+	var FRANCE = Locale{
+		id:     FRANCE,
+		Lang:   "fr",
+		County: "FR",
+	}
+	// Useful constant for language.
+	var GERMANY = Locale{
+		id:     GERMANY,
+		Lang:   "de",
+		County: "DE",
+	}
+	// Useful constant for language.
+	var ITALY = Locale{
+		id:     ITALY,
+		Lang:   "it",
+		County: "it",
+	}
+	// Useful constant for language.
+	var JAPAN = Locale{
+		id:     JAPAN,
+		Lang:   "ja",
+		County: "JP",
+	}
+	// Useful constant for language.
+	var KOREA = Locale{
+		id:     KOREA,
+		Lang:   "ko",
+		County: "KR",
+	}
+	// Useful constant for language.
+	var CHINA = SIMPLIFIED_CHINESE
+	// Useful constant for language.
+	var PRC = SIMPLIFIED_CHINESE
+	// Useful constant for language.
+	var TAIWAN = TRADITIONAL_CHINESE
+	// Useful constant for language.
+	var UK = Locale{
+		id:     UK,
+		Lang:   "en",
+		County: "GB",
+	}
+	// Useful constant for language.
+	var US = Locale{
+		id:     US,
+		Lang:   "en",
+		County: "US",
+	}
+	// Useful constant for language.
+	var CANADA = Locale{
+		id:     CANADA,
+		Lang:   "en",
+		County: "CA",
+	}
+	// Useful constant for language.
+	var CANADA_FRENCH = Locale{
+		id:     CANADA_FRENCH,
+		Lang:   "fr",
+		County: "CA",
+	}
+	// Useful constant for language.
+	var ROOT = Locale{
+		id:     ROOT,
+		Lang:   "",
+		County: "",
+	}
+	locales = append(locales, ENGLISH, FRENCH, GERMAN, ITALIAN, JAPANESE, KOREAN, CHINESE, SIMPLIFIED_CHINESE, TRADITIONAL_CHINESE, FRANCE,
+		GERMANY, ITALY, JAPAN, KOREA, CHINA, PRC, TAIWAN, UK, US, CANADA, CANADA_FRENCH, ROOT)
+}
+
+// GetLocale is use enum value get Locale,
+// default value is ROOT
+func GetLocale(localeEnum LocaleEnum) *Locale {
+	// Useful constant for language.
+	var ROOT = Locale{
+		id:     22,
+		Lang:   "",
+		County: "",
+	}
+	for _, locale := range locales {
+		if localeEnum == CHINA || localeEnum == PRC {

Review comment:
       check first at the beginning of the func

##########
File path: java_util/locale.go
##########
@@ -0,0 +1,240 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java_util
+
+import "fmt"
+
+// LocaleEnum is Locale enumeration value
+type LocaleEnum int
+
+// Locale object enum
+const (
+	ROOT LocaleEnum = iota
+	ENGLISH
+	FRENCH
+	GERMAN
+	ITALIAN
+	JAPANESE
+	KOREAN
+	CHINESE
+	SIMPLIFIED_CHINESE
+	TRADITIONAL_CHINESE
+	FRANCE
+	GERMANY
+	ITALY
+	JAPAN
+	KOREA
+	CHINA
+	PRC
+	TAIWAN
+	UK
+	US
+	CANADA
+	CANADA_FRENCH
+)
+
+// Locale => java.util.Locale
+type Locale struct {
+	// ID is used to implement enumeration
+	id     LocaleEnum
+	Lang   string
+	County string
+}
+
+func (locale *Locale) String() string {
+	if len(locale.County) != 0 {
+		return fmt.Sprintf("%s_%s", locale.Lang, locale.County)
+	}
+	return locale.Lang
+}
+
+// LocaleHandle => com.alibaba.com.caucho.hessian.io.LocaleHandle object
+type LocaleHandle struct {
+	Value string `hessian:"value"`
+}
+
+func (LocaleHandle) JavaClassName() string {
+	return "com.alibaba.com.caucho.hessian.io.LocaleHandle"
+}
+
+var locales []Locale = make([]Locale, 22, 22)
+
+// init java.util.Locale static object
+func init() {
+	// Useful constant for language.
+	var ENGLISH = Locale{
+		id:     ENGLISH,
+		Lang:   "en",
+		County: "",
+	}
+	// Useful constant for language.
+	var FRENCH = Locale{
+		id:     FRENCH,
+		Lang:   "fr",
+		County: "",
+	}
+	// Useful constant for language.
+	var GERMAN = Locale{
+		id:     GERMAN,
+		Lang:   "de",
+		County: "",
+	}
+	// Useful constant for language.
+	var ITALIAN = Locale{
+		id:     ITALIAN,
+		Lang:   "it",
+		County: "",
+	}
+	// Useful constant for language.
+	var JAPANESE = Locale{
+		id:     JAPANESE,
+		Lang:   "ja",
+		County: "",
+	}
+	// Useful constant for language.
+	var KOREAN = Locale{
+		id:     KOREAN,
+		Lang:   "ko",
+		County: "",
+	}
+	// Useful constant for language.
+	var CHINESE = Locale{
+		id:     CHINESE,
+		Lang:   "zh",
+		County: "",
+	}
+	// Useful constant for language.
+	var SIMPLIFIED_CHINESE = Locale{
+		id:     SIMPLIFIED_CHINESE,
+		Lang:   "zh",
+		County: "CN",
+	}
+	// Useful constant for language.
+	var TRADITIONAL_CHINESE = Locale{
+		id:     TRADITIONAL_CHINESE,
+		Lang:   "zh",
+		County: "TW",
+	}
+	// Useful constant for language.
+	var FRANCE = Locale{
+		id:     FRANCE,
+		Lang:   "fr",
+		County: "FR",
+	}
+	// Useful constant for language.
+	var GERMANY = Locale{
+		id:     GERMANY,
+		Lang:   "de",
+		County: "DE",
+	}
+	// Useful constant for language.
+	var ITALY = Locale{
+		id:     ITALY,
+		Lang:   "it",
+		County: "it",
+	}
+	// Useful constant for language.
+	var JAPAN = Locale{
+		id:     JAPAN,
+		Lang:   "ja",
+		County: "JP",
+	}
+	// Useful constant for language.
+	var KOREA = Locale{
+		id:     KOREA,
+		Lang:   "ko",
+		County: "KR",
+	}
+	// Useful constant for language.
+	var CHINA = SIMPLIFIED_CHINESE
+	// Useful constant for language.
+	var PRC = SIMPLIFIED_CHINESE
+	// Useful constant for language.
+	var TAIWAN = TRADITIONAL_CHINESE
+	// Useful constant for language.
+	var UK = Locale{
+		id:     UK,
+		Lang:   "en",
+		County: "GB",
+	}
+	// Useful constant for language.
+	var US = Locale{
+		id:     US,
+		Lang:   "en",
+		County: "US",
+	}
+	// Useful constant for language.
+	var CANADA = Locale{
+		id:     CANADA,
+		Lang:   "en",
+		County: "CA",
+	}
+	// Useful constant for language.
+	var CANADA_FRENCH = Locale{
+		id:     CANADA_FRENCH,
+		Lang:   "fr",
+		County: "CA",
+	}
+	// Useful constant for language.
+	var ROOT = Locale{
+		id:     ROOT,
+		Lang:   "",
+		County: "",
+	}
+	locales = append(locales, ENGLISH, FRENCH, GERMAN, ITALIAN, JAPANESE, KOREAN, CHINESE, SIMPLIFIED_CHINESE, TRADITIONAL_CHINESE, FRANCE,
+		GERMANY, ITALY, JAPAN, KOREA, CHINA, PRC, TAIWAN, UK, US, CANADA, CANADA_FRENCH, ROOT)
+}
+
+// GetLocale is use enum value get Locale,
+// default value is ROOT
+func GetLocale(localeEnum LocaleEnum) *Locale {
+	// Useful constant for language.
+	var ROOT = Locale{

Review comment:
       define root as const?

##########
File path: java_util/locale.go
##########
@@ -0,0 +1,240 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java_util
+
+import "fmt"
+
+// LocaleEnum is Locale enumeration value
+type LocaleEnum int
+
+// Locale object enum
+const (
+	ROOT LocaleEnum = iota
+	ENGLISH
+	FRENCH
+	GERMAN
+	ITALIAN
+	JAPANESE
+	KOREAN
+	CHINESE
+	SIMPLIFIED_CHINESE
+	TRADITIONAL_CHINESE
+	FRANCE
+	GERMANY
+	ITALY
+	JAPAN
+	KOREA
+	CHINA
+	PRC
+	TAIWAN
+	UK
+	US
+	CANADA
+	CANADA_FRENCH
+)
+
+// Locale => java.util.Locale
+type Locale struct {
+	// ID is used to implement enumeration
+	id     LocaleEnum
+	Lang   string
+	County string
+}
+
+func (locale *Locale) String() string {
+	if len(locale.County) != 0 {
+		return fmt.Sprintf("%s_%s", locale.Lang, locale.County)
+	}
+	return locale.Lang
+}
+
+// LocaleHandle => com.alibaba.com.caucho.hessian.io.LocaleHandle object
+type LocaleHandle struct {
+	Value string `hessian:"value"`
+}
+
+func (LocaleHandle) JavaClassName() string {
+	return "com.alibaba.com.caucho.hessian.io.LocaleHandle"
+}
+
+var locales []Locale = make([]Locale, 22, 22)
+
+// init java.util.Locale static object
+func init() {
+	// Useful constant for language.
+	var ENGLISH = Locale{
+		id:     ENGLISH,
+		Lang:   "en",
+		County: "",
+	}
+	// Useful constant for language.
+	var FRENCH = Locale{
+		id:     FRENCH,
+		Lang:   "fr",
+		County: "",
+	}
+	// Useful constant for language.
+	var GERMAN = Locale{
+		id:     GERMAN,
+		Lang:   "de",
+		County: "",
+	}
+	// Useful constant for language.
+	var ITALIAN = Locale{
+		id:     ITALIAN,
+		Lang:   "it",
+		County: "",
+	}
+	// Useful constant for language.
+	var JAPANESE = Locale{
+		id:     JAPANESE,
+		Lang:   "ja",
+		County: "",
+	}
+	// Useful constant for language.
+	var KOREAN = Locale{
+		id:     KOREAN,
+		Lang:   "ko",
+		County: "",
+	}
+	// Useful constant for language.
+	var CHINESE = Locale{
+		id:     CHINESE,
+		Lang:   "zh",
+		County: "",
+	}
+	// Useful constant for language.
+	var SIMPLIFIED_CHINESE = Locale{
+		id:     SIMPLIFIED_CHINESE,
+		Lang:   "zh",
+		County: "CN",
+	}
+	// Useful constant for language.
+	var TRADITIONAL_CHINESE = Locale{
+		id:     TRADITIONAL_CHINESE,
+		Lang:   "zh",
+		County: "TW",
+	}
+	// Useful constant for language.
+	var FRANCE = Locale{
+		id:     FRANCE,
+		Lang:   "fr",
+		County: "FR",
+	}
+	// Useful constant for language.
+	var GERMANY = Locale{
+		id:     GERMANY,
+		Lang:   "de",
+		County: "DE",
+	}
+	// Useful constant for language.
+	var ITALY = Locale{
+		id:     ITALY,
+		Lang:   "it",
+		County: "it",
+	}
+	// Useful constant for language.
+	var JAPAN = Locale{
+		id:     JAPAN,
+		Lang:   "ja",
+		County: "JP",
+	}
+	// Useful constant for language.
+	var KOREA = Locale{
+		id:     KOREA,
+		Lang:   "ko",
+		County: "KR",
+	}
+	// Useful constant for language.
+	var CHINA = SIMPLIFIED_CHINESE
+	// Useful constant for language.
+	var PRC = SIMPLIFIED_CHINESE
+	// Useful constant for language.
+	var TAIWAN = TRADITIONAL_CHINESE
+	// Useful constant for language.
+	var UK = Locale{
+		id:     UK,
+		Lang:   "en",
+		County: "GB",
+	}
+	// Useful constant for language.
+	var US = Locale{
+		id:     US,
+		Lang:   "en",
+		County: "US",
+	}
+	// Useful constant for language.
+	var CANADA = Locale{
+		id:     CANADA,
+		Lang:   "en",
+		County: "CA",
+	}
+	// Useful constant for language.
+	var CANADA_FRENCH = Locale{
+		id:     CANADA_FRENCH,
+		Lang:   "fr",
+		County: "CA",
+	}
+	// Useful constant for language.
+	var ROOT = Locale{
+		id:     ROOT,
+		Lang:   "",
+		County: "",
+	}
+	locales = append(locales, ENGLISH, FRENCH, GERMAN, ITALIAN, JAPANESE, KOREAN, CHINESE, SIMPLIFIED_CHINESE, TRADITIONAL_CHINESE, FRANCE,
+		GERMANY, ITALY, JAPAN, KOREA, CHINA, PRC, TAIWAN, UK, US, CANADA, CANADA_FRENCH, ROOT)
+}
+
+// GetLocale is use enum value get Locale,
+// default value is ROOT
+func GetLocale(localeEnum LocaleEnum) *Locale {
+	// Useful constant for language.
+	var ROOT = Locale{
+		id:     22,
+		Lang:   "",
+		County: "",
+	}
+	for _, locale := range locales {
+		if localeEnum == CHINA || localeEnum == PRC {
+			return GetLocale(SIMPLIFIED_CHINESE)
+		}
+		if localeEnum == TAIWAN {
+			return GetLocale(TRADITIONAL_CHINESE)
+		}
+		if localeEnum == locale.id {
+			return &locale
+		}
+	}
+	return &ROOT
+}
+
+// GetLocaleFromHandler is use LocaleHandle get Locale
+func GetLocaleFromHandler(localeHandler *LocaleHandle) *Locale {
+	// Useful constant for language.
+	var ROOT = Locale{
+		id:     22,
+		Lang:   "",
+		County: "",
+	}
+	for _, locale := range locales {
+		if localeHandler.Value == locale.String() {
+			return &locale
+		}
+	}
+	return &ROOT

Review comment:
       define ROOT as const




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] codecov-commenter edited a comment on pull request #264: Java.util.Locale support

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #264:
URL: https://github.com/apache/dubbo-go-hessian2/pull/264#issuecomment-821794928


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#264](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0a4f22a) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/0d0b7072d6cad1bf8714643e840af4e5967f0ff6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0d0b707) will **decrease** coverage by `0.06%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264/graphs/tree.svg?width=650&height=150&src=pr&token=Yh82j7lS1W&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #264      +/-   ##
   ==========================================
   - Coverage   67.40%   67.34%   -0.07%     
   ==========================================
     Files          26       26              
     Lines        2663     2658       -5     
   ==========================================
   - Hits         1795     1790       -5     
     Misses        649      649              
     Partials      219      219              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [java\_util.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-amF2YV91dGlsLmdv) | `100.00% <100.00%> (ø)` | |
   | [double.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZG91YmxlLmdv) | `85.48% <0.00%> (-1.66%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0d0b707...0a4f22a](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] codecov-commenter edited a comment on pull request #264: Java.util.Locale support

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #264:
URL: https://github.com/apache/dubbo-go-hessian2/pull/264#issuecomment-821794928


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#264](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (27d2ba5) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/0d0b7072d6cad1bf8714643e840af4e5967f0ff6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0d0b707) will **increase** coverage by `0.03%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head 27d2ba5 differs from pull request most recent head a768663. Consider uploading reports for the commit a768663 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264/graphs/tree.svg?width=650&height=150&src=pr&token=Yh82j7lS1W&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #264      +/-   ##
   ==========================================
   + Coverage   67.40%   67.44%   +0.03%     
   ==========================================
     Files          26       26              
     Lines        2663     2666       +3     
   ==========================================
   + Hits         1795     1798       +3     
     Misses        649      649              
     Partials      219      219              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [java\_util.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-amF2YV91dGlsLmdv) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0d0b707...a768663](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] codecov-commenter edited a comment on pull request #264: Java.util.Locale support

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #264:
URL: https://github.com/apache/dubbo-go-hessian2/pull/264#issuecomment-821794928


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#264](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (368b46a) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/0d0b7072d6cad1bf8714643e840af4e5967f0ff6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0d0b707) will **increase** coverage by `0.03%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264/graphs/tree.svg?width=650&height=150&src=pr&token=Yh82j7lS1W&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #264      +/-   ##
   ==========================================
   + Coverage   67.40%   67.44%   +0.03%     
   ==========================================
     Files          26       26              
     Lines        2663     2666       +3     
   ==========================================
   + Hits         1795     1798       +3     
     Misses        649      649              
     Partials      219      219              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [java\_util.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-amF2YV91dGlsLmdv) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0d0b707...368b46a](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] codecov-commenter edited a comment on pull request #264: Java.util

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #264:
URL: https://github.com/apache/dubbo-go-hessian2/pull/264#issuecomment-821794928


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#264](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (274bf93) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/0d0b7072d6cad1bf8714643e840af4e5967f0ff6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0d0b707) will **increase** coverage by `0.03%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264/graphs/tree.svg?width=650&height=150&src=pr&token=Yh82j7lS1W&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #264      +/-   ##
   ==========================================
   + Coverage   67.40%   67.44%   +0.03%     
   ==========================================
     Files          26       26              
     Lines        2663     2666       +3     
   ==========================================
   + Hits         1795     1798       +3     
     Misses        649      649              
     Partials      219      219              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [java\_util.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-amF2YV91dGlsLmdv) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0d0b707...274bf93](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] wongoo commented on a change in pull request #264: Java.util

Posted by GitBox <gi...@apache.org>.
wongoo commented on a change in pull request #264:
URL: https://github.com/apache/dubbo-go-hessian2/pull/264#discussion_r615364989



##########
File path: java_util/locale.go
##########
@@ -0,0 +1,240 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package java_util
+
+import "fmt"
+
+// LocaleEnum is Locale enumeration value
+type LocaleEnum int
+
+// Locale object enum
+const (
+	ROOT LocaleEnum = iota
+	ENGLISH
+	FRENCH
+	GERMAN
+	ITALIAN
+	JAPANESE
+	KOREAN
+	CHINESE
+	SIMPLIFIED_CHINESE
+	TRADITIONAL_CHINESE
+	FRANCE
+	GERMANY
+	ITALY
+	JAPAN
+	KOREA
+	CHINA
+	PRC
+	TAIWAN
+	UK
+	US
+	CANADA
+	CANADA_FRENCH
+)
+
+// Locale => java.util.Locale
+type Locale struct {
+	// ID is used to implement enumeration
+	id     LocaleEnum
+	Lang   string
+	County string
+}
+
+func (locale *Locale) String() string {
+	if len(locale.County) != 0 {
+		return fmt.Sprintf("%s_%s", locale.Lang, locale.County)
+	}
+	return locale.Lang
+}
+
+// LocaleHandle => com.alibaba.com.caucho.hessian.io.LocaleHandle object
+type LocaleHandle struct {
+	Value string `hessian:"value"`
+}
+
+func (LocaleHandle) JavaClassName() string {
+	return "com.alibaba.com.caucho.hessian.io.LocaleHandle"
+}
+
+var locales []Locale = make([]Locale, 22, 22)
+
+// init java.util.Locale static object
+func init() {
+	// Useful constant for language.
+	var ENGLISH = Locale{

Review comment:
       define these locales as consts




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-go-hessian2] codecov-commenter edited a comment on pull request #264: Java.util.Locale support

Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #264:
URL: https://github.com/apache/dubbo-go-hessian2/pull/264#issuecomment-821794928


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#264](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (a768663) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/0d0b7072d6cad1bf8714643e840af4e5967f0ff6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0d0b707) will **increase** coverage by `0.03%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264/graphs/tree.svg?width=650&height=150&src=pr&token=Yh82j7lS1W&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@            Coverage Diff             @@
   ##           master     #264      +/-   ##
   ==========================================
   + Coverage   67.40%   67.44%   +0.03%     
   ==========================================
     Files          26       26              
     Lines        2663     2666       +3     
   ==========================================
   + Hits         1795     1798       +3     
     Misses        649      649              
     Partials      219      219              
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [java\_util.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-amF2YV91dGlsLmdv) | `100.00% <100.00%> (ø)` | |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0d0b707...a768663](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/264?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org