From 51bfcf626608bdcb48a640e921445b42851d9fc3 Mon Sep 17 00:00:00 2001 From: Sergey Trofimov Date: Mon, 8 Jun 2026 12:44:37 +0200 Subject: [PATCH 1/6] (chore): Update Undertow and Clojure dependencies to latest versions --- project.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project.clj b/project.clj index 2dea4b1..af3092d 100644 --- a/project.clj +++ b/project.clj @@ -3,13 +3,13 @@ :url "https://github.com/strojure/undertow" :license {:name "The Unlicense" :url "https://unlicense.org"} - :dependencies [[io.undertow/undertow-core "2.3.5.Final"] + :dependencies [[io.undertow/undertow-core "2.4.1.Final"] [com.github.strojure/web-security "1.2.0-38"]] :java-source-paths ["src"] :javac-options ["-source" "11" "-target" "11"] - :profiles {:provided {:dependencies [[org.clojure/clojure "1.11.1"]]} + :profiles {:provided {:dependencies [[org.clojure/clojure "1.12.5"]]} :dev,,,,, {:dependencies [;; Testing HTTP requests [java-http-clj "0.4.3"]] :source-paths ["doc"]}} From 8cdc4380b5098c62ef8742fb4e065d152096f659 Mon Sep 17 00:00:00 2001 From: Sergey Trofimov Date: Mon, 8 Jun 2026 12:46:18 +0200 Subject: [PATCH 2/6] (refactor): fix reflection warnings after undertow upgrade --- src/strojure/undertow/handler/session.clj | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/strojure/undertow/handler/session.clj b/src/strojure/undertow/handler/session.clj index 70e8ec5..3eb8fff 100644 --- a/src/strojure/undertow/handler/session.clj +++ b/src/strojure/undertow/handler/session.clj @@ -31,17 +31,17 @@ #_{:clj-kondo/ignore [:shadowed-var]} [{:keys [cookie-name, path, domain, discard, secure, http-only, same-site, max-age, comment] :or {http-only true, same-site "Lax"}}] - (let [config (cond-> (SessionCookieConfigPlus.) + (let [config (cond-> (new SessionCookieConfigPlus) (string? same-site) (.setSameSiteMode (name same-site)))] (cond-> ^SessionCookieConfig config - cookie-name (.setCookieName cookie-name) - path (.setPath path) - domain (.setDomain domain) - (some? discard) (.setDiscard (boolean discard)) - (some? secure) (.setSecure (boolean secure)) - (some? http-only) (.setHttpOnly (boolean http-only)) - max-age (.setMaxAge max-age) - comment (.setComment comment)))) + cookie-name ^SessionCookieConfig (.setCookieName cookie-name) + path ^SessionCookieConfig (.setPath path) + domain ^SessionCookieConfig (.setDomain domain) + (some? discard) ^SessionCookieConfig (.setDiscard (boolean discard)) + (some? secure) ^SessionCookieConfig (.setSecure (boolean secure)) + (some? http-only) ^SessionCookieConfig (.setHttpOnly (boolean http-only)) + max-age ^SessionCookieConfig (.setMaxAge max-age) + comment ^SessionCookieConfig (.setComment comment)))) (comment (session-cookie-config {:same-site "Lax"}) From 1452ac60233a7e2836198d054d9074d5fccc793d Mon Sep 17 00:00:00 2001 From: Sergey Trofimov Date: Mon, 8 Jun 2026 12:47:08 +0200 Subject: [PATCH 3/6] (test): fix case sensitivity in cookie attribute checks --- test/strojure/undertow/handler_test.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/strojure/undertow/handler_test.clj b/test/strojure/undertow/handler_test.clj index 4a458fc..b22cb8e 100644 --- a/test/strojure/undertow/handler_test.clj +++ b/test/strojure/undertow/handler_test.clj @@ -51,7 +51,7 @@ (let [cookie (-> (exec {:handler (session-config-handler {:secure true :same-site "none"})}) :headers (get "set-cookie"))] - (test/is (string/includes? cookie "secure")) + (test/is (string/includes? cookie "Secure")) (test/is (string/includes? cookie "SameSite=None"))) (let [cookie (-> (exec {:handler (session-config-handler {:http-only false @@ -59,7 +59,7 @@ :same-site nil})}) :headers (get "set-cookie"))] (test/is (not (string/includes? cookie "HttpOnly"))) - (test/is (not (string/includes? cookie "secure"))) + (test/is (not (string/includes? cookie "Secure"))) (test/is (not (string/includes? cookie "SameSite")))) (let [cookie (-> (exec {:handler (session-config-handler {:same-site false})}) From 90d8e8b799960d26f21b51cbd972fe6d71995c7e Mon Sep 17 00:00:00 2001 From: Sergey Trofimov Date: Mon, 8 Jun 2026 15:50:51 +0200 Subject: [PATCH 4/6] (docs changelog): update changelog with latest Undertow upgrade --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8c0e335..112e253 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). Release date `UNRELEASED` -- (docs api exchange): unify arglists, add link to javadocs +- (docs api exchange): unify arglists, add a link to Javadocs +- (chore): upgrade an Undertow version to "2.4.1.Final" + + (refactor): fix reflection warnings after undertow upgrade ## `1.4.0-125` From 1f56b904163011136b9c199fd0a628b4d143e19f Mon Sep 17 00:00:00 2001 From: Sergey Trofimov Date: Mon, 8 Jun 2026 15:57:14 +0200 Subject: [PATCH 5/6] (fix ci): update tests workflow with Java and Clojure setup --- .github/workflows/tests.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5d0e8db..c44e785 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,18 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 + + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: "11" + + - name: Setup Clojure + uses: DeLaGuardo/setup-clojure@13.4 + with: + lein: latest - run: lein deps From 8b5c50dad570452cc7b9650762b0d226e64dd107 Mon Sep 17 00:00:00 2001 From: Sergey Trofimov Date: Mon, 8 Jun 2026 16:05:29 +0200 Subject: [PATCH 6/6] (feat): require Java version 17+ Required for Undertow. --- .github/workflows/tests.yml | 2 +- CHANGELOG.md | 1 + project.clj | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index c44e785..931088d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,7 +19,7 @@ jobs: uses: actions/setup-java@v4 with: distribution: temurin - java-version: "11" + java-version: "17" - name: Setup Clojure uses: DeLaGuardo/setup-clojure@13.4 diff --git a/CHANGELOG.md b/CHANGELOG.md index 112e253..a13e1f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ Release date `UNRELEASED` - (docs api exchange): unify arglists, add a link to Javadocs - (chore): upgrade an Undertow version to "2.4.1.Final" + (refactor): fix reflection warnings after undertow upgrade + + (feat): require Java version 17+ ## `1.4.0-125` diff --git a/project.clj b/project.clj index af3092d..c6f31ba 100644 --- a/project.clj +++ b/project.clj @@ -7,7 +7,7 @@ [com.github.strojure/web-security "1.2.0-38"]] :java-source-paths ["src"] - :javac-options ["-source" "11" "-target" "11"] + :javac-options ["--release" "17"] :profiles {:provided {:dependencies [[org.clojure/clojure "1.12.5"]]} :dev,,,,, {:dependencies [;; Testing HTTP requests