Skip to content

Commit cf6e0bb

Browse files
cquirozsoc
authored andcommitted
Publish 2.0.0-M5, Fix #47: Test failures on TestDateTimeFormatters on Scala 2.12
1 parent ccc3593 commit cf6e0bb

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ Scala 2.10, 2.11, and 2.12 are supported.
5353

5454
To get started with SBT, add one (or both) of these dependencies:
5555

56-
- `libraryDependencies += "io.github.soc" %% "scala-java-time" % "2.0.0-M4"` (for Scala)
57-
- `libraryDependencies += "io.github.soc" %%% "scala-java-time" % "2.0.0-M4"` (for Scala.js, [Scala.js plugin](http://www.scala-js.org/tutorial/basic/#sbt-setup) required)
56+
- `libraryDependencies += "io.github.soc" %% "scala-java-time" % "2.0.0-M5"` (for Scala)
57+
- `libraryDependencies += "io.github.soc" %%% "scala-java-time" % "2.0.0-M5"` (for Scala.js, [Scala.js plugin](http://www.scala-js.org/tutorial/basic/#sbt-setup) required)
5858

5959
#### Building
6060
This project builds using sbt.

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ val crossScalaVer = Seq(scalaVer, "2.10.6", "2.12.0")
77

88
lazy val commonSettings = Seq(
99
name := "scala-java-time",
10-
version := "2.0.0-M4",
10+
version := "2.0.0-M5",
1111
organization := "io.github.soc",
1212
homepage := Some(url("https://github.com/soc/scala-java-time")),
1313
licenses := Seq("BSD 3-Clause License" -> url("https://opensource.org/licenses/BSD-3-Clause")),

changes.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
</properties>
99
<body>
1010
<!-- types are add, fix, remove, update -->
11+
<release version="2.0.0-M5" date="2016-11-08" description="v2.0.0-M5">
12+
<action dev="cquiroz" type="fix" >
13+
Fix #47: Test failures on TestDateTimeFormatters on Scala 2.12
14+
</action>
15+
</release>
1116
<release version="2.0.0-M4" date="2016-11-06" description="v2.0.0-M4">
1217
<action dev="cquiroz" type="update" >
1318
Update locales version using CLDR 30

jvm/src/test/scala/org/threeten/bp/format/TestDateTimeFormatters.scala

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,13 @@ object TestDateTimeFormatters {
111111

112112
def isSupported(field: TemporalField): Boolean = fields.containsKey(field)
113113

114-
def getLong(field: TemporalField): Long =
115-
try fields.get(field)
116-
catch {
117-
case ex: NullPointerException =>
118-
throw new DateTimeException("Field missing: " + field)
119-
}
114+
def getLong(field: TemporalField): Long = {
115+
val long: java.lang.Long = fields.get(field)
116+
if (long == null)
117+
throw new DateTimeException(s"Field missing: $field")
118+
else
119+
long
120+
}
120121

121122
@SuppressWarnings(Array("unchecked")) override def query[R >: Null](query: TemporalQuery[R]): R =
122123
if (query eq TemporalQueries.zoneId)

0 commit comments

Comments
 (0)