-
Notifications
You must be signed in to change notification settings - Fork 381
Normalizer emulation #9970
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
Normalizer emulation #9970
Conversation
b62a424 to
09928d1
Compare
niloc132
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checkstyle apparently crashed https://github.com/gwtproject/gwt/actions/runs/9573687321/job/26395563622?pr=9970#step:6:11634. Give it a shot locally, see if you can see why? I can give it it a shot if it isn't clear after you try - the newer checkstyle does seem to be a bit slower and prone to issues...
Aside from the extra newlines, only thing at a glance that looks off to me is the 4-space indentation, rather than the project standard of 2-space.
| import jsinterop.annotations.JsType; | ||
|
|
||
| /** | ||
| * Emulation of {@code java.text.Normalizer}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that this is circular - maybe a link to javadoc instead? e.g. https://docs.oracle.com/en/java/javase/11/docs/api/java.base/java/text/Normalizer.html
| import java.text.Normalizer; | ||
| import java.text.Normalizer.Form; | ||
|
|
||
| public class NormalizerTest extends EmulTestBase { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't run if not added to a suite.
user/test/com/google/gwt/emultest/java/text/NormalizerTest.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Colin Alworth <colin@vertispan.com>
Co-authored-by: Colin Alworth <colin@vertispan.com>
Co-authored-by: Colin Alworth <colin@vertispan.com>
niloc132
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checkstyle is happy, tests pass locally.
Typically we're a little conservative with adding new JRE emulation, but since this is so close to what the browser itself offers, it seems to make good sense to land this.
It should be noted that elemental2's JsString also supports these (but we don't want GWT's JRE to depend on elemental2 at all).
Co-authored-by: Colin Alworth <colin@vertispan.com>
niloc132
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved by me at least, will give it another day or so for anyone else to comment.
Adds emulation for
java.text.Normalizerusing the nativenormalizemethod on String.