[OpenJDK 2D-Dev] RFR: 8252999: Cleanup: replace .equals("") with .isEmpty() within all codebase
smarks at openjdk.java.net
Fri Sep 18 02:50:45 UTC 2020
On Fri, 11 Sep 2020 15:17:58 GMT, Bradford Wetmore <wetmore at openjdk.org> wrote:
>> Ok, sorry for the distraction.
> Our local Santuario maintainer says:
> In general, changes to Apache Santuario should also be made at Apache so we stay in sync.
Hi @doom369, I hope we didn't end up wasting too much of your time with this. I wanted to respond to a comment you made
earlier in this PR,
> I have in mind dozens of improvements all over the code like this one.
It's hard to see, but as you discovered, the JDK has different groups of people maintaining different areas, and
sometimes there are hidden constraints on those different areas, for example, to avoid divergence with upstream source
bases. And as you discovered, sometimes those source bases might need to maintain compatibility with an older JDK ...
so we don't want to update this code even though it's IN the JDK.
Those kind of constraints generally don't apply to code in the java.base module, since there's nothing upstream of it,
and by definition it cannot depend on anything outside the JDK. Generally -- though there are exceptions -- we're more
receptive to keeping stuff in java.base (and sometimes related modules close to the core) on the latest and greatest
stuff. There are some constraints, however. There are some things we can't use too early during initialization of the
JDK, such as lambdas. Also, there is some code lurking around that is sometimes executed by the boot JDK, which is
typically one release behind. (This is definitely the case for tools like javac, but I think it might also apply to
some things in base.)
Anyway, if you'd like to pursue some of these improvements, drop a note to core-libs-dev at openjdk and we can talk about
More information about the 2d-dev