From bdc10526de123ca9a6ee6f61e528b36d394b19e5 Mon Sep 17 00:00:00 2001 From: Yogthos Date: Wed, 28 Oct 2026 18:18:18 -0400 Subject: [PATCH] Accept the JVM's class name for a host ByteArrayInputStream jolt now reports (type (ByteArrayInputStream. ...)) as the class itself, as the JVM does, instead of java.io.InputStream. The test only needs to know the stream is jolt's own and not the shim, so accept either name. --- test/jolt/http/stream_shim_test.clj | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/jolt/http/stream_shim_test.clj b/test/jolt/http/stream_shim_test.clj index 3e4dda4..4a9766f 100644 --- a/test/jolt/http/stream_shim_test.clj +++ b/test/jolt/http/stream_shim_test.clj @@ -83,7 +83,10 @@ (let [host-streams? @#'jolt.http.platform/host-byte-streams?] (if host-streams? (testing "jolt models them, so no ctor override and these are jolt's own" - (is (= "class java.io.InputStream" (str (type (ByteArrayInputStream. (byte-array 1)))))) + ;; jolt before 0.8.24 named the host stream by its interface; later + ;; versions name the class itself, as the JVM does. Either is jolt's own. + (is (contains? #{"class java.io.InputStream" "class java.io.ByteArrayInputStream"} + (str (type (ByteArrayInputStream. (byte-array 1)))))) (is (not= "class :object" (str (type (ByteArrayOutputStream.)))))) (testing "jolt cannot answer the surface, so the shim stands in" (is (= "class :object" (str (type (ByteArrayInputStream. (byte-array 1))))))))))