Skip to content

Commit 8518032

Browse files
Merge pull request clj-time#162 from dluksza/master
Fix reflections warnings
2 parents 7ab4f78 + 906c9ec commit 8518032

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/clj_time/core.clj

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -458,17 +458,17 @@
458458
(in-weeks [this] (-> this .toPeriod .toStandardWeeks .getWeeks))
459459
(in-months [this]
460460
(condp instance? this
461-
org.joda.time.Months (.getMonths this)
462-
org.joda.time.Years (* 12 (.getYears this))
463-
(throw
464-
(UnsupportedOperationException.
461+
org.joda.time.Months (.getMonths ^org.joda.time.Months this)
462+
org.joda.time.Years (* 12 (.getYears ^org.joda.time.Years this))
463+
(throw
464+
(UnsupportedOperationException.
465465
"Cannot convert to Months because months vary in length."))))
466-
(in-years [this]
467-
(condp instance? this
468-
org.joda.time.Months (int (/ (.getMonths this) 12))
469-
org.joda.time.Years (.getYears this)
470-
(throw
471-
(UnsupportedOperationException.
466+
(in-years [this]
467+
(condp instance? this
468+
org.joda.time.Months (int (/ (.getMonths ^org.joda.time.Months this) 12))
469+
org.joda.time.Years (.getYears ^org.joda.time.Years this)
470+
(throw
471+
(UnsupportedOperationException.
472472
"Cannot convert to Years because years vary in length.")))))
473473

474474
(defn in-msecs

0 commit comments

Comments
 (0)