Open cushon opened 1 year ago
The following code doesn't compile with JDK 21 and newer: https://github.com/aws/amazon-redshift-jdbc-driver/blob/5fd2db671a187c6f9e39dc9831798000e1166fe9/src/main/java/com/amazon/redshift/util/StreamWrapper.java#L116
It overrides finalize() in FileInputStream, which throws IOException. That override was removed in JDK 12: https://bugs.openjdk.org/browse/JDK-8192939
finalize()
FileInputStream
IOException
The compilation error with newer versions is:
com/amazon/redshift/util/StreamWrapper.java:120: error: unreported exception Throwable; must be caught or declared to be thrown super.finalize(); ^
Thanks for submitting this issue @cushon . I'll take a look and get back to you when I have an update
The following code doesn't compile with JDK 21 and newer: https://github.com/aws/amazon-redshift-jdbc-driver/blob/5fd2db671a187c6f9e39dc9831798000e1166fe9/src/main/java/com/amazon/redshift/util/StreamWrapper.java#L116
It overrides
finalize()
inFileInputStream
, which throwsIOException
. That override was removed in JDK 12: https://bugs.openjdk.org/browse/JDK-8192939The compilation error with newer versions is: