From f95c0c4dae8bd37efaa946754e5883b3d28eb377 Mon Sep 17 00:00:00 2001 From: Mark Rotteveel Date: Fri, 14 Jun 2024 13:24:51 +0200 Subject: [PATCH] #810 Update JNA to 5.14.0 --- build.gradle | 2 +- src/docs/asciidoc/faq.adoc | 4 ++-- src/docs/asciidoc/release_notes.adoc | 27 ++++++++++++++++----------- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/build.gradle b/build.gradle index 2bf6766b3..ba5b4a1a2 100644 --- a/build.gradle +++ b/build.gradle @@ -72,7 +72,7 @@ ext { } dependencies { - nativeImplementation 'net.java.dev.jna:jna:5.12.1' + nativeImplementation 'net.java.dev.jna:jna:5.14.0' compileOnly 'javax.servlet:javax.servlet-api:4.0.1' compileOnly 'jakarta.servlet:jakarta.servlet-api:5.0.0' diff --git a/src/docs/asciidoc/faq.adoc b/src/docs/asciidoc/faq.adoc index 7dede3794..9cef77565 100644 --- a/src/docs/asciidoc/faq.adoc +++ b/src/docs/asciidoc/faq.adoc @@ -49,14 +49,14 @@ For example, for Java 11: ---- -If you want to use Type 2 support (native or embedded), you need to explicitly include JNA 5.12.1 as a dependency: +If you want to use Type 2 support (native or embedded), you need to explicitly include JNA 5.14.0 as a dependency: [source,xml] ---- net.java.dev.jna jna - 5.12.1 + 5.14.0 ---- diff --git a/src/docs/asciidoc/release_notes.adoc b/src/docs/asciidoc/release_notes.adoc index 3a4196691..f496b09d6 100644 --- a/src/docs/asciidoc/release_notes.adoc +++ b/src/docs/asciidoc/release_notes.adoc @@ -9,6 +9,7 @@ :icons: font :sectnums: :jaybird-fbclient-version: 4.0.4.0 +:jna-version: 5.14.0 ifeval::["{version_tag}" != ""] [WARNING] @@ -59,6 +60,10 @@ Repeated calls to `getResultSet` will now return the current result set. As part of this change implementations of `FirebirdStatement.getCurrentResultSet` now simply returns `getResultSet`, and the `getCurrentResultSet` method has been deprecated for removal in Jaybird 7. + This improvement was backported from Jaybird 6. +* Improvement: Updated JNA dependency to version 5.14.0 (https://github.com/FirebirdSQL/jaybird/issues/810[#810]) ++ +If you use native or embedded connections, make sure the upgrade the JNA dependency to JNA 5.14.0 by replacing the JAR or updating the JNA (`net.java.dev.jna:jna`) version number in your build configuration. +In practice, Jaybird should still be able to work with JNA 5.12.1 (the version used in Jaybird 5.0.0 -- 5.0.4). * ... [#jaybird-5-0-4-changelog] @@ -279,14 +284,14 @@ For example: ---- -If you want to use Type 2 support (native or embedded), you need to explicitly include JNA 5.12.1 as a dependency: +If you want to use Type 2 support (native or embedded), you need to explicitly include JNA {jna-version} as a dependency: -[source,xml] +[source,xml,subs="verbatim,attributes"] ---- net.java.dev.jna jna - 5.12.1 + {jna-version} ---- @@ -302,7 +307,7 @@ You can download the latest versions from https://firebirdsql.org/en/jdbc-driver At minimum, Jaybird 5 requires `jaybird-{version_simple}.{version_tag}.jar` (where `` is `java11` or `java8`). -For native or embedded support, you will need to include `jna-5.12.1.jar` on your classpath. +For native or embedded support, you will need to include `jna-{jna-version}.jar` on your classpath. See also <>. [#upgrading-from-jaybird-4-to-jaybird-5] @@ -330,14 +335,14 @@ When your Jaybird dependency defines the exclusion for `javax.resource:connector For more detailed instructions, see also the information on Maven in <>. -If you use native or embedded, make sure to update your JNA dependency to version 5.12.1 (Jaybird 5 requires at least JNA 5.0). +If you use native or embedded, make sure to update your JNA dependency to version {jna-version} (Jaybird 5 requires at least JNA 5.0). -[source,xml] +[source,xml,subs="verbatim,attributes"] ---- net.java.dev.jna jna - 5.12.1 + {jna-version} ---- @@ -349,7 +354,7 @@ If you manage your dependencies manually, you need to do the following: . Replace the Jaybird 4 library with the Jaybird 5 version ** `jaybird-4.0.x..jar` with `jaybird-{version_simple}.{version_tag}.jar` (where `` is `java11` or `java8`) ** `jaybird-full-4.0.x..jar` with `jaybird-{version_simple}.{version_tag}.jar`, the `jaybird-full` library no longer exists -. Replace the `jna-5.5.0.jar` library with `jna-5.12.1.jar` +. Replace the `jna-5.5.0.jar` library (or any JNA version before {jna-version}) with `jna-{jna-version}.jar` + This library is only needed if you actually use native or embedded connections, otherwise remove JNA (assuming your application itself or other dependencies don't use it). . Remove the `connector-api-1.5.jar` library, it is no longer used by Jaybird @@ -1267,16 +1272,16 @@ The replacement for most constants can be found in `org.firebirdsql.jaybird.prop === Type 2 (native) and embedded driver Jaybird uses JNA (Java Native Access) to access the client library. -If you want to use the Type 2 driver, or Firebird embedded, then you need to include `jna-5.12.1.jar` on the classpath. +If you want to use the Type 2 driver, or Firebird embedded, then you need to include `jna-{jna-version}.jar` on the classpath. When using Maven, you need to specify the dependency on JNA yourself, as we don't depend on it by default (it is specified as an optional dependency): -[source,xml] +[source,xml,subs="verbatim,attributes"] ---- net.java.dev.jna jna - 5.12.1 + {jna-version} ----