eventmesh icon indicating copy to clipboard operation
eventmesh copied to clipboard

[ISSUE #982] Explicit usage of byte encoding

Open hezean opened this issue 3 years ago • 6 comments

Fixes #982.

Modifications

Explicitly set the encoding charset for string-char or char-string conversions.

Documentation

  • Does this pull request introduce a new feature? no

hezean avatar Aug 07 '22 03:08 hezean

@HeZean Great job, could you please make this into several small pr?

qqeasonchen avatar Aug 08 '22 01:08 qqeasonchen

@HeZean Great job, could you please make this into several small pr?

With pleasure, does that mean submitting one PR for each module or so? Could you please further point it out

hezean avatar Aug 08 '22 02:08 hezean

@HeZean Great job, could you please make this into several small pr?

With pleasure, does that mean submitting one PR for each module or so? Could you please further point it out

yes, that would be better to review, thx.

qqeasonchen avatar Aug 08 '22 02:08 qqeasonchen

Hi @qqeasonchen, I just remembered that most changes are related to Constants.DEFAULT_CHARSET, which was changed from string "UTF-8" to charset StandardCharset.UTF_8, splitting this PR may be not that feasible since it would break some code (e.g. some code was Charset.forName(Constants.DEFAULT_CHARSET) should be changed to Constants.DEFAULT_CHARSET)

hezean avatar Aug 08 '22 06:08 hezean

Maybe could you just review the changes thoroughly? they are all trivial modifications.

hezean avatar Aug 08 '22 06:08 hezean

Maybe could you just review the changes thoroughly? they are all trivial modifications.

Got it, but smaller prs would be easy to review if you wish, thx.

qqeasonchen avatar Aug 08 '22 07:08 qqeasonchen

@HeZean please take care of the CI check fails

qqeasonchen avatar Aug 26 '22 09:08 qqeasonchen

okay, i'll fix it soon in a commit

hezean avatar Aug 26 '22 10:08 hezean

Codecov Report

Merging #1105 (2ccebae) into master (73ba956) will decrease coverage by 0.09%. The diff coverage is 15.87%.

:exclamation: Current head 2ccebae differs from pull request most recent head eff8883. Consider uploading reports for the commit eff8883 to get more accurate results

@@             Coverage Diff              @@
##             master    #1105      +/-   ##
============================================
- Coverage     10.33%   10.24%   -0.10%     
+ Complexity      668      663       -5     
============================================
  Files           382      382              
  Lines         23640    23639       -1     
  Branches       2619     2619              
============================================
- Hits           2444     2421      -23     
- Misses        20985    21005      +20     
- Partials        211      213       +2     
Impacted Files Coverage Δ
.../connector/rocketmq/consumer/PushConsumerImpl.java 24.64% <ø> (ø)
...e/eventmesh/protocol/http/HttpProtocolAdaptor.java 5.88% <0.00%> (+0.16%) :arrow_up:
...col/http/resolver/HttpRequestProtocolResolver.java 0.00% <0.00%> (ø)
...tmesh/registry/etcd/factory/EtcdClientFactory.java 38.00% <0.00%> (ø)
...esh/registry/etcd/service/EtcdRegistryService.java 21.77% <0.00%> (-0.18%) :arrow_down:
...time/admin/handler/DeleteWebHookConfigHandler.java 26.66% <0.00%> (ø)
...time/admin/handler/InsertWebHookConfigHandler.java 26.66% <0.00%> (ø)
...e/admin/handler/QueryWebHookConfigByIdHandler.java 26.66% <0.00%> (ø)
...ndler/QueryWebHookConfigByManufacturerHandler.java 22.22% <0.00%> (ø)
...dmin/handler/RedirectClientBySubSystemHandler.java 8.00% <0.00%> (ø)
... and 35 more

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

codecov[bot] avatar Aug 26 '22 12:08 codecov[bot]

The license checker failed, I've opened #1188 and will fix it in another pr.

hezean avatar Aug 26 '22 14:08 hezean