google / re2j

linear time regular expression matching in Java
Other
1.19k stars 160 forks source link

Replaces String.getBytes("UTF") with getBytes(StandardCharsets.UTF_8) #145

Closed gkdn closed 3 years ago

gkdn commented 3 years ago

This avoids the unnecessary more complicated path that resolves the charset by name.

codecov-commenter commented 3 years ago

Codecov Report

Merging #145 (b47965d) into master (f9c0a8c) will increase coverage by 0.05%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #145      +/-   ##
==========================================
+ Coverage   89.27%   89.33%   +0.05%     
==========================================
  Files          18       18              
  Lines        3022     3019       -3     
  Branches      607      607              
==========================================
- Hits         2698     2697       -1     
+ Misses        186      184       -2     
  Partials      138      138              
Impacted Files Coverage Δ
java/com/google/re2j/RE2.java 94.59% <100.00%> (+0.70%) :arrow_up:

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 f9c0a8c...b47965d. Read the comment docs.

gkdn commented 3 years ago

Hi @sjamesr Could you pls take a look the CL and merge if it is acceptable? We hit this issue in J2WASM experiment which has limited JDK support and this seems like a quick nice fix for us.

sjamesr commented 3 years ago

Thank you, looks good!