Skip to content

Commit 877e4e1

Browse files
committed
Fix reflection warnings JDBC-152
1 parent 8f32b6b commit 877e4e1

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
Changes coming in 0.7.0
2+
3+
* Reflection warnings removed in `reducible-result-set` [JDBC-152](https://dev.clojure.org/jira/browse/JDBC-152).
4+
15
Changes in 0.7.0-beta2
26

37
* Support for Clojure 1.6.0 and earlier has been dropped -- breaking change.

project.clj

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,5 @@
3838
:repositories {"sonatype-oss-public" "https://oss.sonatype.org/content/groups/public/"
3939
"ws-archiva" "https://d259tvauhnips9.cloudfront.net/archiva/repository/internal/"}
4040
;; include dev profile with 1.9 to pull in test.check
41-
:aliases {"test-all" ["with-profile" "test,1.7:test,1.8:dev,test,1.9" "test"]
42-
"check-all" ["with-profile" "1.7:1.8:1.9" "check"]}
41+
:aliases {"test-all" ["with-profile" "test,1.7:test,1.8:dev,test,1.9" "test"]}
4342
:min-lein-version "2.0.0")

src/main/clojure/clojure/java/jdbc.clj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html"}
4545
[clojure.walk :as walk])
4646
(:import (java.net URI)
4747
(java.sql BatchUpdateException DriverManager
48-
PreparedStatement ResultSet SQLException Statement Types)
48+
PreparedStatement ResultSet ResultSetMetaData
49+
SQLException Statement Types)
4950
(java.util Hashtable Map Properties)
5051
(javax.sql DataSource)))
5152

@@ -975,12 +976,12 @@ http://clojure-doc.org/articles/ecosystem/java_jdbc/home.html"}
975976
(let [identifier-fn (if qualifier
976977
(comp (partial keyword qualifier) identifiers)
977978
(comp keyword identifiers))
978-
make-keys (fn [idxs rsmeta]
979+
make-keys (fn [idxs ^ResultSetMetaData rsmeta]
979980
(->> idxs
980981
(mapv (fn [^Integer i] (.getColumnLabel rsmeta i)))
981982
(make-cols-unique)
982983
(mapv identifier-fn)))
983-
init-reduce (fn [keys rs rsmeta idxs f init]
984+
init-reduce (fn [keys ^ResultSet rs rsmeta idxs f init]
984985
(loop [init' init]
985986
(if (.next rs)
986987
(let [result (f init' (zipmap keys (read-columns rs rsmeta idxs)))]

0 commit comments

Comments
 (0)