Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support java wrapper types #350

Merged
merged 13 commits into from
Feb 21, 2023
Merged

support java wrapper types #350

merged 13 commits into from
Feb 21, 2023

Conversation

tiltwind
Copy link
Contributor

@tiltwind tiltwind commented Feb 12, 2023

What this PR does:

New supported java wrapper types:

java wrapper types golang types
java.lang.Integer *int32
java.lang.Byte *byte
java.lang.Short *int16
java.lang.Boolean *bool
java.lang.Long *int64
java.lang.Float *float32
java.lang.Double *float64
java.lang.Character *hessian.Rune

BUT,BUT,BUT it is NOT forward compatible.
The following types art not supported from v2.0.0, if u use these types, use the replacing types instead:

unsupported types use replacing types instead
hessian.IntegerArray []*int32
hessian.ByteArray []*byte
hessian.ShortArray []*int16
hessian.BooleanArray []*bool
hessian.LongArray []*int64
hessian.FloatArray []*float32
hessian.DoubleArray []*float64
hessian.CharacterArray []*hessian.Rune

The PR includes the following changes:

  1. define new inner register function to support special golang types to map java class name.
  2. define *hessian.Rune to ref java.lang.Character
  3. upgrade hessian-lite to 3.2.13, and add function to remove the serilization limit for test classes in package com.caucho.hessian.test.
  4. Fix bugs in unit tests.
  5. Fix multiple level array name incorrectly combined.

we will push it to 2.0 branch for previous test, u can upgrade and test it by executing go get github.com/apache/dubbo-go-hessian2@2.0.

Which issue(s) this PR fixes:

Fixes #349 #344 #345

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

support java wrapper types, includes Interger,Long,Short,Float,Double,Character

@codecov-commenter
Copy link

Codecov Report

Merging #350 (76acae4) into 2.0 (4820c03) will decrease coverage by 3.57%.
The diff coverage is 65.57%.

@@            Coverage Diff             @@
##              2.0     #350      +/-   ##
==========================================
- Coverage   72.18%   68.62%   -3.57%     
==========================================
  Files          27       28       +1     
  Lines        3128     3216      +88     
==========================================
- Hits         2258     2207      -51     
- Misses        633      774     +141     
+ Partials      237      235       -2     
Impacted Files Coverage Δ
array.go 0.00% <ø> (-100.00%) ⬇️
codec.go 65.21% <42.85%> (-6.84%) ⬇️
list.go 86.34% <92.59%> (+0.75%) ⬆️
encode.go 79.67% <100.00%> (+0.50%) ⬆️
java_lang.go 100.00% <100.00%> (ø)
pojo.go 82.60% <100.00%> (+0.15%) ⬆️
java_collection.go 54.92% <0.00%> (-5.64%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@tiltwind tiltwind requested review from AlexStocks and removed request for AlbumenJ and justxuewei February 15, 2023 01:26
@tiltwind
Copy link
Contributor Author

this pull target branch is 2.0, suggest to approve it, so that we can continue to test it in dubbo-go.

@tiltwind
Copy link
Contributor Author

@AlexStocks suggest to approve and push to 2.0 branch, so that users can test it.

@AlexStocks AlexStocks merged commit 6ea8710 into apache:2.0 Feb 21, 2023
@AlexStocks
Copy link
Contributor

done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants