On 27/10/2025 06:28, Erwin Stadlbauer wrote:
Hello,

we have an issue with the JDK 25. The Bug-Fix JDK-8024695
<https://bugs.openjdk.org/browse/JDK-8024695> (new File("").exists()) for
JDK 25 is a breaking change for us. Because the function shows another
behavior now.

jdk-24 and below: new File("").exists() return false.
jdk-25: new File("").exists() return true, because "" is now the current
working directory

Tomcat 9 to 11 have 150 code points where File.exists() is used.

Can this fix be a problem for Tomcat 9 up to 11, if any variable is an
empty string ?

Thanks for bringing this to our attention.

There might be a few edge cases - we'd need to check each usage - but generally if there were going to be issues I'd expect to see them in the tests and we know that the tests pass with Java 25.

I can't think of any place in the code where Tomcat would be subject to the sort of regressions described in JDK-8024695. If anything, I'd think it was more likely the old behaviour might have caused an issue rather than the new.

I'll add doing a code review for this to my TODO list.

I have created a Bug-Ticket JDK-8370216, that is open for discussion. I hope

What is your view on this topic and the further development of Tomcat.

At this point it is probably a non-issue but we'll check just to make sure.

Personally, I am in favour of the change made in Java 25.

Do you recommend JDK-25 for Tomcat 9 up to 11

Yes.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to