The implication of the JDK-8194154 fix in jdk8u342.

Andrew Hughes gnu.andrew at redhat.com
Fri Jul 29 01:09:23 UTC 2022


On 13:27 Wed 20 Jul     , Sergey Bylokhov wrote:
> Hello, the last release of jdk8u includes the fix for JDK-8194154[1] which disabled the possibility 
> to change the "user.dir" property.
> 
> Changing the "user.dir" was not recommended from the beginning but it was not forbidden, so there 
> are some old applications that rely on the old behavior. One of the app which sets the "user.dir" is 
> Gradle. The Gradle has a notice in the documentation for the user:
> "Never use new File(relative path) because this creates a path relative to the current working 
> directory (CWD). Gradle can make no guarantees about the location of the CWD, which means builds 
> that rely on it may break at any time".
> 
> But for compatibility reasons they still set the "user.dir" property, so the old plugins will work. 
> Now that compatibility is broken due to the fix I mention. We found such apps immediately after the 
> release.
> 
> I would like to ask what was the reason for the backport, is it critical enough to change a 
> behavior? I did not find any broad discussion about that backport nor the reason why it was pushed 
> but I would like to bring a compatibility concerns about that change. I think we should roll it back 
> as soon as possible.
> 
> Please share your opinions?
> 
> [1] https://bugs.openjdk.org/browse/JDK-8194154
> 
> -- 
> Best regards, Sergey.
> 

This is the first I've heard of this patch and I'm not sure why this
was ever backported to 8u. I don't see any reasoning on the original
PR or approval request and I didn't approve this one myself. I don't
believe I would have on the basis of what I'm seeing now.

Thanks for raising the issue.  From the discussion on here, it seems
reverting this is unanimous and the original submitter agrees it was a
mistake.  I have hence asked for openjdk8u345 to be created in JBS and
we'll proceed with an interim release to revert this as soon as
possible.

How was the Gradle issue found? Only after release? It appears this
patch was integrated in March, so I'm concerned that we didn't catch
something like this earlier e.g. in rampdown.

Best regards,
-- 
Andrew :)
Pronouns: he / him or they / them
Senior Free Java Software Engineer
OpenJDK Package Owner
Red Hat, Inc. (http://www.redhat.com)

PGP Key: ed25519/0xCFDA0F9B35964222 (hkp://keys.gnupg.net)
Fingerprint = 5132 579D D154 0ED2 3E04  C5A0 CFDA 0F9B 3596 4222
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://mail.openjdk.org/pipermail/jdk8u-dev/attachments/20220729/97bbc523/signature.asc>


More information about the jdk8u-dev mailing list