-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
25
A DESCRIPTION OF THE PROBLEM :
in former JDKs up to JDK-24 the statement 'new File("").exists()' return false
In JDK-25 it returns true.
https://bugs.openjdk.org/browse/JDK-8024695
This could cause an undefined behavior in libraries and the use of JDK-25 is now a risk
Suggestion:
deprecate exists() and make a new method e.g. itExists(), isExistent()
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
new File("").exists() in JDK 24 returns false
new File("").exists() in JDK 25 returns true
in former JDKs up to JDK-24 the statement 'new File("").exists()' return false
In JDK-25 it returns true.
https://bugs.openjdk.org/browse/JDK-8024695
This could cause an undefined behavior in libraries and the use of JDK-25 is now a risk
Suggestion:
deprecate exists() and make a new method e.g. itExists(), isExistent()
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
new File("").exists() in JDK 24 returns false
new File("").exists() in JDK 25 returns true