Hello, For JDK 25 our code is not my point. I can fix it and guard it against libraries.
The point is, does all other/external software that we use, work with JDK 25 and the new behavior of File.exists(). The first appearance of this bug in the JDK is from 2013 and now 2025 the bug is fixed. It's a long time that developers have been working with this bug. The behavior of File.exists is changed. Therefore we cannot know whether Tomcat or other libraries with many File-IO, will run properly after the fix in JDK-25 Mark gave me good answers to my question. I hope this helps for clearance. Regards Erwin stadlbauer Am Mo., 27. Okt. 2025 um 19:50 Uhr schrieb Christopher Schultz < [email protected]>: > All, > > On 10/27/25 4:59 AM, Mark Thomas wrote: > > 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. > > This report looks weird. new File("") is documented to return something > that isn't terribly useful. Unless you convert it to an absolute path, > you get something that essentially doesn't exist. > > I'm not sure why this is being raised. > > If you want the CWD, you should use new File("."). Is this an issue with > programs calling new File(String) with values that aren't checked > beforehand to ensure they are either absolute (e.g. starts with /) or > relative? Or just not-empty? > > -chris > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, please notify Airbus immediately and delete this e-mail. Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately. All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.
