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

Fixes #232 Add go struct refer to java.util.UUID #256

Merged
merged 24 commits into from
Mar 14, 2021

Conversation

zhangymPerson
Copy link
Contributor

What this PR does:

Which issue(s) this PR fixes:

Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:


.travis.yml Outdated Show resolved Hide resolved
.travis.yml Outdated Show resolved Hide resolved
java_util/UUID.go Outdated Show resolved Hide resolved
java_util/UUID.go Outdated Show resolved Hide resolved
java_util_test.go Outdated Show resolved Hide resolved
@wongoo
Copy link
Contributor

wongoo commented Jan 28, 2021

ci error: java_util/UUID.go:68:20: invalid operation: int64(1) << (digits * 4) (shift count type int, must be unsigned integer)

@codecov-io
Copy link

codecov-io commented Jan 31, 2021

Codecov Report

Merging #256 (06613ee) into master (c052455) will decrease coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #256      +/-   ##
==========================================
- Coverage   67.61%   67.56%   -0.05%     
==========================================
  Files          25       26       +1     
  Lines        2671     2667       -4     
==========================================
- Hits         1806     1802       -4     
  Misses        644      644              
  Partials      221      221              
Impacted Files Coverage Δ
java_util.go 100.00% <100.00%> (ø)
java_collection.go 49.23% <0.00%> (-1.52%) ⬇️
response.go 52.35% <0.00%> (-0.50%) ⬇️
list.go 83.67% <0.00%> (-0.33%) ⬇️
date.go 68.18% <0.00%> (ø)
hessian.go 46.07% <0.00%> (ø)
request.go 59.40% <0.00%> (ø)
java_sql_time.go 65.67% <0.00%> (ø)
java_unknown_exception.go 86.36% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c052455...06613ee. Read the comment docs.

@wongoo
Copy link
Contributor

wongoo commented Feb 4, 2021

@zhangymPerson can u add another unit test , which check whether the uuid string generated by java is equal to that generated by golang ?

java_util/UUID.go Outdated Show resolved Hide resolved
java_util/UUID_test.go Outdated Show resolved Hide resolved
@wongoo
Copy link
Contributor

wongoo commented Mar 12, 2021

@zhangymPerson can u add another unit test , which check whether the uuid string generated by java is equal to that generated by golang ?

@zhangymPerson maybe u do not got what I means, u response uuid string like the following and check whether it's equal to &java_util.UUID{LeastSigBits: int64(-7160773830801198154), MostSigBits: int64(459021424248441700)}.ToString()

    public static String javautilUUIDString() {
        UUID uuid = new UUID(459021424248441700L, -7160773830801198154L);
        return uuid.toString();
    }

@wongoo wongoo requested review from fangyincheng and zouyx March 13, 2021 16:00
@wongoo wongoo merged commit 5527e91 into apache:master Mar 14, 2021
zhaoyunxing92 pushed a commit that referenced this pull request Sep 4, 2021
* add license checker

* dd javaProject java8time test code and add go hessian/java8_time strcut Year and testFunc

* alter author and error word

* add java.util.UUID encode

* Revert "reset go.mod after go fmt"

This reverts commit ab7254f

* add UUID test

* alter .travis.yml

* alter code

* add license

* shift count type int, must be unsigned integer

* alter file name and delete test file

* alter file name

* delete file

* alter file name

* alter file name

* add uuid struct info and split import block.

* add java UUID encode and uuid.toString() equals go uuid.ToString() test func

* alter ToString() -> String()

* fix code review

Co-authored-by: zouyixian <zouyixian@shein.com>
Co-authored-by: wilson chen <willson.chenwx@gmail.com>
Co-authored-by: wangoo <wongoo@apache.org>
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.

6 participants