Add StringWriter#10333
Conversation
1df014e to
bdda85d
Compare
|
hmm, not sure if it's related to this pr
|
niloc132
left a comment
There was a problem hiding this comment.
I do see that j2cl also has ASF sources for this class, contributed in google/j2cl@7a98b9c, but with slightly different contents, and fairly different tests (so I don't think you're attributing Google because you copied it from them?).
| @@ -0,0 +1,141 @@ | |||
| /* | |||
| * Copyright 2025 Google Inc. | |||
There was a problem hiding this comment.
I dont think so, but @treblereel can confirm - this was copied (and modified) from the j2cl repo, where it is copyright Google and licensed as apache, so we can copy from there if we retain those details.
There was a problem hiding this comment.
yeap, exactly. I took StringWriter and the tests from J2CL and adapted them
| @@ -0,0 +1,96 @@ | |||
| // CHECKSTYLE_OFF: Copyrighted to the Android Open Source Project. | |||
| /* | |||
| * Licensed to the Apache Software Foundation (ASF) under one or more | |||
There was a problem hiding this comment.
While I definitely appreciate the attribution and the fact that there is an apache licensed emul out there we can lean on, two questions:
- first, this appears simple enough it could just be implemented from scratch, right? the test apparently isnt from asf, so that work had to be done fresh...?
- second, who is the copyright owner? my read of the copyright notice is that we must list the owner. The content at https://www.apache.org/licenses/LICENSE-2.0.html (almost the link below, but https) says
To apply the Apache License to specific files in your work, attach the following boilerplate declaration, replacing the fields enclosed by brackets "[]" with your own identifying information. (Don't include the brackets!) Enclose the text in the appropriate comment syntax for the file format. We also recommend that you include a file or class name and description of purpose on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
From https://www.apache.org/foundation/license-faq,
Note that the Apache Software Foundation uses a different source header that is related to our use of a CLA. Our instructions for our project's source headers are here.
4afbcfd to
44a94c9
Compare
niloc132
left a comment
There was a problem hiding this comment.
Would you merge this up to date for CI? Otherwise looks good to me.
- added a GWT port of StringWriter for compatibility with the J2CL Java emulation layer Signed-off-by: Dmitrii Tikhomirov <chani.liet@gmail.com>
Signed-off-by: Dmitrii Tikhomirov <chani.liet@gmail.com>
Signed-off-by: Dmitrii Tikhomirov <chani.liet@gmail.com>
ref https://github.com/google/j2cl/blob/master/jre/java/java/io/StringWriter.java