diff --git a/.travis.yml b/.travis.yml index 9f68a31a6..30adc7477 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ language: scala +sudo: false scala: - 2.10.4 - 2.11.2 diff --git a/CHANGES.md b/CHANGES.md index f8d7186d5..4946aa98d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Bijection # +### 0.7.2 +* FIX: gzip Bijection resource leak. https://github.com/twitter/bijection/pull/193 +* Use new Travis CI infrastructure https://github.com/twitter/bijection/pull/191 + ### 0.7.1 * Remove some package privacy so these things can be used in scalding and ...: https://github.com/twitter/bijection/pull/190 * Add macros to create Trys: https://github.com/twitter/bijection/pull/187 diff --git a/README.md b/README.md index c9bbc5376..7b20212ed 100644 --- a/README.md +++ b/README.md @@ -124,6 +124,8 @@ Injections to any of these types give you binary serialization via Bufferable. ## Community and Documentation +This, and all github.com/twitter projects, are under the [Twitter Open Source Code of Conduct](https://engineering.twitter.com/opensource/code-of-conduct). Additionally, see the [Typelevel Code of Conduct](http://typelevel.org/conduct) for specific examples of harassing behavior that are not tolerated. + To learn more and find links to tutorials and information around the web, check out the [Bijection Wiki](https://github.com/twitter/bijection/wiki). The latest ScalaDocs are hosted on Bijection's [Github Project Page](http://twitter.github.io/bijection). @@ -132,7 +134,7 @@ Discussion occurs primarily on the [Bijection mailing list](https://groups.googl ## Maven -Bijection modules are available on maven central. The current groupid and version for all modules is, respectively, `"com.twitter"` and `0.7.1`. +Bijection modules are available on maven central. The current groupid and version for all modules is, respectively, `"com.twitter"` and `0.7.2`. Current published artifacts are diff --git a/bijection-core/src/main/scala/com/twitter/bijection/BinaryBijections.scala b/bijection-core/src/main/scala/com/twitter/bijection/BinaryBijections.scala index 4fd7d8e5e..e45f8a7bc 100644 --- a/bijection-core/src/main/scala/com/twitter/bijection/BinaryBijections.scala +++ b/bijection-core/src/main/scala/com/twitter/bijection/BinaryBijections.scala @@ -81,12 +81,14 @@ trait BinaryBijections extends StringBijections { val baos = new ByteArrayOutputStream val gos = new GZIPOutputStream(baos) gos.write(bytes) - gos.finish() + gos.close() GZippedBytes(baos.toByteArray) } override def invert(gz: GZippedBytes) = { val baos = new ByteArrayOutputStream - copy(new GZIPInputStream(new ByteArrayInputStream(gz.bytes)), baos) + val is = new GZIPInputStream(new ByteArrayInputStream(gz.bytes)) + copy(is, baos) + is.close() baos.toByteArray } } diff --git a/project/Build.scala b/project/Build.scala index 6f577cc42..2a3231b0d 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -18,7 +18,7 @@ object BijectionBuild extends Build { val sharedSettings = Project.defaultSettings ++ osgiSettings ++ scalariformSettings ++ Seq( organization := "com.twitter", - crossScalaVersions := Seq("2.10.4", "2.11.2"), + crossScalaVersions := Seq("2.10.4", "2.11.5"), ScalariformKeys.preferences := formattingPreferences, diff --git a/version.sbt b/version.sbt index 4db284699..38be20ed4 100644 --- a/version.sbt +++ b/version.sbt @@ -1,2 +1,2 @@ -version in ThisBuild := "0.7.1" +version in ThisBuild := "0.7.2"