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

Small patch, adding CharSequence::isEmpty #10097

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vjay82
Copy link

@vjay82 vjay82 commented Feb 19, 2025

Fixes #10091

@niloc132
Copy link
Member

Thanks for the contribution - would you add a "quick" test for this? The test method itself should be quick (empty string, non-empty string, maybe mutate a StringBuilder to be empty, then non-empty, then empty again), but setting up the test is going to be a little irritating to add since the test won't compile with Java 11, it will need to have super-source.

  • Start with a class like com.google.gwt.emultest.java15.lang.StringTest (can copy from the java11.lang.StringTest for copyright header, superclass), but it will need a special runTest method like Java17Test has to only run with a high enough source level.
  • The test method itself needs to be a stub with no implementation, since it wouldn't compile otherwise.
  • Then, make a copy of the class, with no runTest, and with the stub populated, in somewhere like user/test-super/com/google/gwt/dev/jjs/super/com/google/gwt/emultest/java15/lang/StringTest.java. This will be supersourced, so your IDE may not see it properly, and will correctly not be compiled in Java 11.

@vjay82
Copy link
Author

vjay82 commented Feb 20, 2025

Ok, will have a look when some free time is at hand,

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.

CharSequence isEmpty method is missing
2 participants