Support #3553
closedJava 9 deprecated methods
0%
Description
While inspecting our product for Java 9 support, we ran the jdeprscan tool on our own jars and their dependencies.
For Saxon-EE 9.8.0.6 this brought up the attached list of references to deprecated methods. The list can be reproduced by running
jdeprscan saxon9ee.jar
All of the listed methods are still supported by Java 9, but in my understanding they might vanish in future releases, i.e. possibly next year. So it might be useful to replace their references, using non-deprecated methods.
Best regards
Gunther
Files
Updated by Michael Kay almost 7 years ago
Thanks for this information.
Many of these invocations are in the third-party ASM library, which I think is actively maintained so we can probably expect a new version to fix them. The others we should be able to deal with ourselves.
In the past, deprecating interfaces in the JDK has usually proved a bit of empty threat - there are too many useful JAR files out there that haven't changed in years and aren't likely to.
FWIW, my current intention is that the next major Saxon release will require Java 8 (currently we require Java 6 or higher).
Updated by Michael Kay almost 7 years ago
With the exception of the occurrences in the 3rd party ASM library, I have fixed these on the development branch.
Updated by Michael Kay almost 7 years ago
One that I haven't yet fixed is the Configuration.finalize() method. The alternatives to this appear pretty complicated (see https://stackoverflow.com/questions/47762986/replacing-finalize-in-java )
Given that the only resource causing problems here is the log file used by the Configuration, and this only needs closing if the user has created a non-standard Logger, I think I will simply pass this problem back to the user. I'm inclined to give the Configuration a close() method, and encourage users to close either the Configuration or its Logger manually.
Updated by Michael Kay over 6 years ago
- Description updated (diff)
- Category set to Internals
- Status changed from New to Resolved
- Assignee set to Michael Kay
- Priority changed from Low to Normal
Resolved on the development branch.
Please register to edit this issue