Project

Profile

Help

Support #3553

closed

Java 9 deprecated methods

Added by Gunther Rademacher over 6 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
-
Start date:
2017-11-30
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

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

jdeprscan.log (4.28 KB) jdeprscan.log Gunther Rademacher, 2017-11-30 13:07
Actions #1

Updated by Michael Kay over 6 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).

Actions #2

Updated by Michael Kay over 6 years ago

With the exception of the occurrences in the 3rd party ASM library, I have fixed these on the development branch.

Actions #3

Updated by Michael Kay over 6 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.

Actions #4

Updated by Michael Kay over 5 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

Also available in: Atom PDF