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/09/13 06:23:29 UTC

[GitHub] [dubbo-go-hessian2] Mulavar opened a new pull request #278: [WIP]feat(*): add Integer[] serializer

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


   <!--  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 #
   
   **Special notes for your reviewer**:
   
   **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
   
   ```


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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 #278: feat(*): support wrapper classes for Java basic types

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


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?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 [#278](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (feebbd1) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/8679ff8a4d41e585f8bb62e58ff5879ab815fdad?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8679ff8) will **increase** coverage by `1.21%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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/278?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     #278      +/-   ##
   ==========================================
   + Coverage   68.87%   70.09%   +1.21%     
   ==========================================
     Files          26       27       +1     
     Lines        2911     3016     +105     
   ==========================================
   + Hits         2005     2114     +109     
   + Misses        683      677       -6     
   - Partials      223      225       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [array.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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-YXJyYXkuZ28=) | `100.00% <100.00%> (ø)` | |
   | [java\_collection.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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-amF2YV9jb2xsZWN0aW9uLmdv) | `58.90% <0.00%> (+5.47%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?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/278?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 [8679ff8...feebbd1](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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] AlexStocks commented on a change in pull request #278: feat(*): support wrapper classes for Java basic types

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



##########
File path: array.go
##########
@@ -0,0 +1,222 @@
+/*
+ * 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 hessian
+
+func init() {
+	SetCollectionSerialize(&IntegerArray{})
+	SetCollectionSerialize(&ByteArray{})
+	SetCollectionSerialize(&ShortArray{})
+	SetCollectionSerialize(&BooleanArray{})
+	SetCollectionSerialize(&LongArray{})
+	SetCollectionSerialize(&FloatArray{})
+	SetCollectionSerialize(&DoubleArray{})
+	SetCollectionSerialize(&CharacterArray{})
+}
+
+//BooleanArray Boolean[]
+type BooleanArray struct {
+	Values []bool
+}
+
+func (ba *BooleanArray) Get() []interface{} {

Review comment:
       Pls add comment "// nolint"




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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 #278: feat(*): support wrapper classes for Java basic types

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


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?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 [#278](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b470210) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/8679ff8a4d41e585f8bb62e58ff5879ab815fdad?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8679ff8) will **increase** coverage by `1.13%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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/278?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     #278      +/-   ##
   ==========================================
   + Coverage   68.87%   70.01%   +1.13%     
   ==========================================
     Files          26       27       +1     
     Lines        2911     3008      +97     
   ==========================================
   + Hits         2005     2106     +101     
   + Misses        683      677       -6     
   - Partials      223      225       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [array.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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-YXJyYXkuZ28=) | `100.00% <100.00%> (ø)` | |
   | [double.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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) | `86.15% <0.00%> (-1.52%)` | :arrow_down: |
   | [java\_collection.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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-amF2YV9jb2xsZWN0aW9uLmdv) | `58.90% <0.00%> (+5.47%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?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/278?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 [8679ff8...b470210](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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] Mulavar commented on a change in pull request #278: feat(*): support wrapper classes for Java basic types

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



##########
File path: array.go
##########
@@ -0,0 +1,257 @@
+/*
+ * 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 hessian
+
+import (
+	"strings"
+)
+
+func init() {
+	SetCollectionSerialize(&IntegerArray{})
+	SetCollectionSerialize(&ByteArray{})
+	SetCollectionSerialize(&ShortArray{})
+	SetCollectionSerialize(&BooleanArray{})
+	SetCollectionSerialize(&LongArray{})
+	SetCollectionSerialize(&FloatArray{})
+	SetCollectionSerialize(&DoubleArray{})
+	SetCollectionSerialize(&CharacterArray{})
+}
+
+// BooleanArray Boolean[]
+type BooleanArray struct {
+	Values []bool
+}
+
+// nolint
+func (ba *BooleanArray) Get() []interface{} {
+	res := make([]interface{}, len(ba.Values))
+	for i, v := range ba.Values {
+		res[i] = v
+	}
+	return res
+}
+
+// nolint
+func (ba *BooleanArray) Set(vs []interface{}) {
+	values := make([]bool, len(vs))
+	for i, v := range vs {
+		values[i] = v.(bool)
+	}
+	ba.Values = values
+}
+
+// nolint
+func (*BooleanArray) JavaClassName() string {
+	return "[java.lang.Boolean"
+}
+
+//IntegerArray Integer[]
+type IntegerArray struct {
+	Values []int32
+}
+
+// nolint
+func (ia *IntegerArray) Get() []interface{} {
+	res := make([]interface{}, len(ia.Values))
+	for i, v := range ia.Values {
+		res[i] = v
+	}
+	return res
+}
+
+// nolint
+func (ia *IntegerArray) Set(vs []interface{}) {
+	values := make([]int32, len(vs))
+	for i, v := range vs {
+		values[i] = v.(int32)
+	}
+	ia.Values = values
+}
+
+// nolint
+func (*IntegerArray) JavaClassName() string {
+	return "[java.lang.Integer"
+}
+
+// ByteArray Byte[]
+type ByteArray struct {
+	IntegerArray

Review comment:
       In the beginning, it was for simplicity, but you are right, and I will alse use []int16 as ShortArray.Values in the next commit.




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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 #278: feat(*): support wrapper classes for Java basic types

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


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?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 [#278](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (e9dc06c) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/8679ff8a4d41e585f8bb62e58ff5879ab815fdad?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8679ff8) will **increase** coverage by `1.13%`.
   > The diff coverage is `100.00%`.
   
   > :exclamation: Current head e9dc06c differs from pull request most recent head b470210. Consider uploading reports for the commit b470210 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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/278?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     #278      +/-   ##
   ==========================================
   + Coverage   68.87%   70.01%   +1.13%     
   ==========================================
     Files          26       27       +1     
     Lines        2911     3008      +97     
   ==========================================
   + Hits         2005     2106     +101     
   + Misses        683      677       -6     
   - Partials      223      225       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [array.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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-YXJyYXkuZ28=) | `100.00% <100.00%> (ø)` | |
   | [double.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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) | `86.15% <0.00%> (-1.52%)` | :arrow_down: |
   | [java\_collection.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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-amF2YV9jb2xsZWN0aW9uLmdv) | `58.90% <0.00%> (+5.47%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?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/278?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 [8679ff8...b470210](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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 pull request #278: feat(*): support wrapper classes for Java basic types

Posted by GitBox <gi...@apache.org>.
wongoo commented on pull request #278:
URL: https://github.com/apache/dubbo-go-hessian2/pull/278#issuecomment-920495009


   @Mulavar thanks for your effort. wrapper classes is mainly for java, so the unit test should contains cross language encode/decode.  Pls pay more time to do that, thanks very much!
   
   
   eg:
   
   **go encode -> java decode**: 
   - go encode: https://github.com/apache/dubbo-go-hessian2/blob/e0c085c9ea5936e771ecc351c94609d5a56a7a1b/output/output.go#L44
   - java decode: https://github.com/apache/dubbo-go-hessian2/blob/e0c085c9ea5936e771ecc351c94609d5a56a7a1b/test_hessian/src/test/java/unit/GoUserListTest.java#L33
   
   **java encode-> go decode**:
   - java encode: https://github.com/apache/dubbo-go-hessian2/blob/e0c085c9ea5936e771ecc351c94609d5a56a7a1b/test_hessian/src/main/java/test/TestCustomReply.java#L605
   - go decode: https://github.com/apache/dubbo-go-hessian2/blob/e0c085c9ea5936e771ecc351c94609d5a56a7a1b/object_test.go#L791


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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 #278: feat(*): support wrapper classes for Java basic types

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



##########
File path: array.go
##########
@@ -0,0 +1,257 @@
+/*
+ * 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 hessian
+
+import (
+	"strings"
+)
+
+func init() {
+	SetCollectionSerialize(&IntegerArray{})
+	SetCollectionSerialize(&ByteArray{})
+	SetCollectionSerialize(&ShortArray{})
+	SetCollectionSerialize(&BooleanArray{})
+	SetCollectionSerialize(&LongArray{})
+	SetCollectionSerialize(&FloatArray{})
+	SetCollectionSerialize(&DoubleArray{})
+	SetCollectionSerialize(&CharacterArray{})
+}
+
+// BooleanArray Boolean[]
+type BooleanArray struct {
+	Values []bool
+}
+
+// nolint
+func (ba *BooleanArray) Get() []interface{} {
+	res := make([]interface{}, len(ba.Values))
+	for i, v := range ba.Values {
+		res[i] = v
+	}
+	return res
+}
+
+// nolint
+func (ba *BooleanArray) Set(vs []interface{}) {
+	values := make([]bool, len(vs))
+	for i, v := range vs {
+		values[i] = v.(bool)
+	}
+	ba.Values = values
+}
+
+// nolint
+func (*BooleanArray) JavaClassName() string {
+	return "[java.lang.Boolean"
+}
+
+//IntegerArray Integer[]
+type IntegerArray struct {
+	Values []int32
+}
+
+// nolint
+func (ia *IntegerArray) Get() []interface{} {
+	res := make([]interface{}, len(ia.Values))
+	for i, v := range ia.Values {
+		res[i] = v
+	}
+	return res
+}
+
+// nolint
+func (ia *IntegerArray) Set(vs []interface{}) {
+	values := make([]int32, len(vs))
+	for i, v := range vs {
+		values[i] = v.(int32)
+	}
+	ia.Values = values
+}
+
+// nolint
+func (*IntegerArray) JavaClassName() string {
+	return "[java.lang.Integer"
+}
+
+// ByteArray Byte[]
+type ByteArray struct {
+	IntegerArray

Review comment:
       why not use uint8 as byte value?




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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] AlexStocks merged pull request #278: feat(*): support wrapper classes for Java basic types

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


   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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 #278: feat(*): support wrapper classes for Java basic types

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


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?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 [#278](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8512ed3) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/8679ff8a4d41e585f8bb62e58ff5879ab815fdad?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8679ff8) will **increase** coverage by `1.16%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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/278?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     #278      +/-   ##
   ==========================================
   + Coverage   68.87%   70.04%   +1.16%     
   ==========================================
     Files          26       27       +1     
     Lines        2911     3011     +100     
   ==========================================
   + Hits         2005     2109     +104     
   + Misses        683      677       -6     
   - Partials      223      225       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [array.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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-YXJyYXkuZ28=) | `100.00% <100.00%> (ø)` | |
   | [java\_collection.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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-amF2YV9jb2xsZWN0aW9uLmdv) | `58.90% <0.00%> (+5.47%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?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/278?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 [8679ff8...8512ed3](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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] Mulavar commented on a change in pull request #278: feat(*): support wrapper classes for Java basic types

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



##########
File path: array.go
##########
@@ -0,0 +1,257 @@
+/*
+ * 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 hessian
+
+import (
+	"strings"
+)
+
+func init() {
+	SetCollectionSerialize(&IntegerArray{})
+	SetCollectionSerialize(&ByteArray{})
+	SetCollectionSerialize(&ShortArray{})
+	SetCollectionSerialize(&BooleanArray{})
+	SetCollectionSerialize(&LongArray{})
+	SetCollectionSerialize(&FloatArray{})
+	SetCollectionSerialize(&DoubleArray{})
+	SetCollectionSerialize(&CharacterArray{})
+}
+
+// BooleanArray Boolean[]
+type BooleanArray struct {
+	Values []bool
+}
+
+// nolint
+func (ba *BooleanArray) Get() []interface{} {
+	res := make([]interface{}, len(ba.Values))
+	for i, v := range ba.Values {
+		res[i] = v
+	}
+	return res
+}
+
+// nolint
+func (ba *BooleanArray) Set(vs []interface{}) {
+	values := make([]bool, len(vs))
+	for i, v := range vs {
+		values[i] = v.(bool)
+	}
+	ba.Values = values
+}
+
+// nolint
+func (*BooleanArray) JavaClassName() string {
+	return "[java.lang.Boolean"
+}
+
+//IntegerArray Integer[]
+type IntegerArray struct {
+	Values []int32
+}
+
+// nolint
+func (ia *IntegerArray) Get() []interface{} {
+	res := make([]interface{}, len(ia.Values))
+	for i, v := range ia.Values {
+		res[i] = v
+	}
+	return res
+}
+
+// nolint
+func (ia *IntegerArray) Set(vs []interface{}) {
+	values := make([]int32, len(vs))
+	for i, v := range vs {
+		values[i] = v.(int32)
+	}
+	ia.Values = values
+}
+
+// nolint
+func (*IntegerArray) JavaClassName() string {
+	return "[java.lang.Integer"
+}
+
+// ByteArray Byte[]
+type ByteArray struct {
+	IntegerArray

Review comment:
       done




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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 #278: feat(*): support wrapper classes for Java basic types

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


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?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 [#278](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (feebbd1) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/8679ff8a4d41e585f8bb62e58ff5879ab815fdad?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8679ff8) will **increase** coverage by `1.13%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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/278?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     #278      +/-   ##
   ==========================================
   + Coverage   68.87%   70.01%   +1.13%     
   ==========================================
     Files          26       27       +1     
     Lines        2911     3008      +97     
   ==========================================
   + Hits         2005     2106     +101     
   + Misses        683      677       -6     
   - Partials      223      225       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [array.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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-YXJyYXkuZ28=) | `100.00% <100.00%> (ø)` | |
   | [double.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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) | `86.15% <0.00%> (-1.52%)` | :arrow_down: |
   | [java\_collection.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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-amF2YV9jb2xsZWN0aW9uLmdv) | `58.90% <0.00%> (+5.47%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?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/278?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 [8679ff8...feebbd1](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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 #278: feat(*): support wrapper classes for Java basic types

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


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?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 [#278](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9aafe3b) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/8679ff8a4d41e585f8bb62e58ff5879ab815fdad?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (8679ff8) will **increase** coverage by `1.21%`.
   > The diff coverage is `100.00%`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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/278?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     #278      +/-   ##
   ==========================================
   + Coverage   68.87%   70.09%   +1.21%     
   ==========================================
     Files          26       27       +1     
     Lines        2911     3016     +105     
   ==========================================
   + Hits         2005     2114     +109     
   + Misses        683      677       -6     
   - Partials      223      225       +2     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [array.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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-YXJyYXkuZ28=) | `100.00% <100.00%> (ø)` | |
   | [java\_collection.go](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278/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-amF2YV9jb2xsZWN0aW9uLmdv) | `58.90% <0.00%> (+5.47%)` | :arrow_up: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?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/278?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 [8679ff8...9aafe3b](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/278?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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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 #278: feat(*): support wrapper classes for Java basic types

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



##########
File path: array_test.go
##########
@@ -0,0 +1,156 @@
+/*
+ * 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 hessian
+
+import (
+	"github.com/stretchr/testify/assert"
+	"testing"
+)
+
+func TestBooleanArray(t *testing.T) {
+	booleanArray := &BooleanArray{[]bool{true, false}}
+	jcs := JavaCollectionSerializer{}
+	e := &Encoder{}
+	a := assert.New(t)
+
+	err := jcs.EncObject(e, booleanArray)

Review comment:
       not use the internal api to test, use `e.Encode(booleanArray)` instead.




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

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