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/11/29 14:53:49 UTC

[GitHub] [dubbo-go-hessian2] sanxun0325 opened a new pull request #295: support java function param type

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


   <!--  Thanks for sending a pull request! 
   -->
   
   **What this PR does**:
   Supports specifying the types of Java method parameters.
   golang decode fails when the Java interface receives a parameter type of parent class and is actually passed a subclass
   **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 #https://github.com/apache/dubbo-go-hessian2/issues/293
   
   **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] AlexStocks commented on a change in pull request #295: support java function param type

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



##########
File path: README.md
##########
@@ -195,8 +195,35 @@ type MyUser struct {
 
 ```
 
+#### Encoding param name
+When a Java method declares an argument as a parent class, it actually receives a subclass,
+You can specify the encoding type of the parameter separately.
 
-##### hessian.SetTagIdentifier

Review comment:
       下面加一行空格




-- 
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 #295: support java function param type

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



##########
File path: README.md
##########
@@ -195,8 +195,35 @@ type MyUser struct {
 
 ```
 
+#### Encoding param name

Review comment:
       下面加一行空格




-- 
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 #295: support java function param type

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



##########
File path: README.md
##########
@@ -195,8 +195,35 @@ type MyUser struct {
 
 ```
 
+#### Encoding param name
+When a Java method declares an argument as a parent class, it actually receives a subclass,
+You can specify the encoding type of the parameter separately.
 
-##### hessian.SetTagIdentifier
+```go
+type MyUser struct {
+    UserFullName      string   `hessian:"user_full_name"`
+    FamilyPhoneNumber string   // default convert to => familyPhoneNumber
+}
+
+func (m *MyUser) JavaClassName() string {
+    return "com.company.myuser"
+}
+
+func (m *MyUser) JavaParamName() string {

Review comment:
       这里我觉得是不是需要给出对应的 java 代码示例,说明 class-param-struct 这三个 tag 的意义。光这么一个 go 代码块,我自己都看不懂这有啥用




-- 
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] sanxun0325 commented on a change in pull request #295: support java function param type

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



##########
File path: README.md
##########
@@ -195,8 +195,35 @@ type MyUser struct {
 
 ```
 
+#### Encoding param name
+When a Java method declares an argument as a parent class, it actually receives a subclass,
+You can specify the encoding type of the parameter separately.
 
-##### hessian.SetTagIdentifier
+```go
+type MyUser struct {
+    UserFullName      string   `hessian:"user_full_name"`
+    FamilyPhoneNumber string   // default convert to => familyPhoneNumber
+}
+
+func (m *MyUser) JavaClassName() string {
+    return "com.company.myuser"
+}
+
+func (m *MyUser) JavaParamName() string {

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] sanxun0325 commented on a change in pull request #295: support java function param type

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



##########
File path: README.md
##########
@@ -195,8 +195,35 @@ type MyUser struct {
 
 ```
 
+#### Encoding param name

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] wongoo merged pull request #295: support java function param type

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


   


-- 
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 #295: support java function param type

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


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/295?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 [#295](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/295?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (05bb514) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/7cabe51f90162d12ad0e3095c60fedf1d170053b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7cabe51) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   > :exclamation: Current head 05bb514 differs from pull request most recent head b1d8df7. Consider uploading reports for the commit b1d8df7 to get more accurate results
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/295/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/295?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     #295   +/-   ##
   =======================================
     Coverage   70.10%   70.10%           
   =======================================
     Files          27       27           
     Lines        3044     3044           
   =======================================
     Hits         2134     2134           
     Misses        683      683           
     Partials      227      227           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/295?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/295?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 [7cabe51...b1d8df7](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/295?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] sanxun0325 commented on a change in pull request #295: support java function param type

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



##########
File path: README.md
##########
@@ -195,8 +195,35 @@ type MyUser struct {
 
 ```
 
+#### Encoding param name
+When a Java method declares an argument as a parent class, it actually receives a subclass,
+You can specify the encoding type of the parameter separately.
 
-##### hessian.SetTagIdentifier

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 #295: support java function param type

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


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/295?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 [#295](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/295?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (95e7f2a) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/7cabe51f90162d12ad0e3095c60fedf1d170053b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7cabe51) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/295/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/295?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     #295   +/-   ##
   =======================================
     Coverage   70.10%   70.10%           
   =======================================
     Files          27       27           
     Lines        3044     3044           
   =======================================
     Hits         2134     2134           
     Misses        683      683           
     Partials      227      227           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/295?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/295?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 [7cabe51...95e7f2a](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/295?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 #295: support java function param type

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


   # [Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/295?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 [#295](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/295?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (4f15abe) into [master](https://codecov.io/gh/apache/dubbo-go-hessian2/commit/7cabe51f90162d12ad0e3095c60fedf1d170053b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7cabe51) will **not change** coverage.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/295/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/295?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     #295   +/-   ##
   =======================================
     Coverage   70.10%   70.10%           
   =======================================
     Files          27       27           
     Lines        3044     3044           
   =======================================
     Hits         2134     2134           
     Misses        683      683           
     Partials      227      227           
   ```
   
   
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/295?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/295?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 [7cabe51...4f15abe](https://codecov.io/gh/apache/dubbo-go-hessian2/pull/295?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