Commit 383156b 1 parent d2cb0f2 commit 383156b Copy full SHA for 383156b
File tree 2 files changed +4
-6
lines changed
2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 76
76
(when (contains? digits (first characters))
77
77
(let [content (string (take-while (set " 1234567890._" )) characters)
78
78
content (.replaceAll content " _" " " )
79
- number (if (some #{\.} content)
80
- (Double/parseDouble content)
81
- (Long/parseLong content))]
79
+ number (if (some #{\.} content) (parse-double content) (parse-long content))]
82
80
[number (drop (count content) characters)])))
83
81
84
82
(defn- read-ops2 [chars]
Original file line number Diff line number Diff line change 4
4
(when-let [[[_ major minor patch modifier]]
5
5
(seq (re-seq #"(\d +)\. (\d +)\. (\d +)(-SNAPSHOT)?"
6
6
version))]
7
- {:major (Long/parseLong major)
8
- :minor (Long/parseLong minor)
9
- :patch (Long/parseLong patch)
7
+ {:major (parse-long major)
8
+ :minor (parse-long minor)
9
+ :patch (parse-long patch)
10
10
:modifier (case modifier
11
11
" -SNAPSHOT" modifier-snapshot
12
12
nil nil )}))
You can’t perform that action at this time.
0 commit comments