css4j / echosvg

SVG implementation in the Java™ Language, fork of Apache Batik, supporting level 4 selectors and colors.
Apache License 2.0
40 stars 2 forks source link

JDK 18 deprecates finalization for removal #38

Closed carlosame closed 2 years ago

carlosame commented 2 years ago

Forthcoming JDK 18 deprecates finalization for removal, see JEP 421 for details.

EchoSVG uses finalization in two places:

https://github.com/css4j/echosvg/blob/298d49ee7606c90aaa8c51e99faa8782147da2fa/echosvg-bridge/src/main/java/io/sf/carte/echosvg/bridge/BridgeContext.java#L311

https://github.com/css4j/echosvg/blob/298d49ee7606c90aaa8c51e99faa8782147da2fa/echosvg-transcoder/src/main/java/io/sf/carte/echosvg/ext/awt/image/codec/util/SeekableStream.java#L980

and the code should be changed so the finalize() can be removed in favor of a more modern construct.

carlosame commented 2 years ago

After 95c8bea2 there are no more finalize() methods. Closing.