From 052a7d368dd700631dc53b1a946b3ea89a889a2f Mon Sep 17 00:00:00 2001 From: "P. Oscar Boykin" Date: Mon, 15 Dec 2014 10:36:27 -1000 Subject: [PATCH 1/5] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index c9bbc5376..a121eac36 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). From 180a08c06c0b2c04f3edf9f25d3ca406a5b0e3da Mon Sep 17 00:00:00 2001 From: Chris Aniszczyk Date: Thu, 18 Dec 2014 16:47:31 -0600 Subject: [PATCH 2/5] Use new Travis CI infrastructure Signed-off-by: Chris Aniszczyk --- .travis.yml | 1 + 1 file changed, 1 insertion(+) 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 From d6123a44604a3357ec7daa2401bf92f39d79af19 Mon Sep 17 00:00:00 2001 From: Philippe Laflamme Date: Fri, 9 Jan 2015 21:33:54 -0500 Subject: [PATCH 3/5] FIX: gzip Bijection resource leak. GZIPOutputStream#finish() does not relinquish all resources. Specifically the Deflater instance used internally will release resources when end() called which only happens on close() or when finalize() is invoked by the garbage collector. Thus, the use of finish() without close() relies on finalizers to cleanup resources which is a Bad Thing(tm). The same logic was applied to the reverse Bijection. --- .../main/scala/com/twitter/bijection/BinaryBijections.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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 } } From 292099fdcb713f71544f69434edadb83c5d3514f Mon Sep 17 00:00:00 2001 From: Alex Levenson Date: Fri, 16 Jan 2015 14:05:00 -0800 Subject: [PATCH 4/5] Prepare for relase of 0.7.2 --- CHANGES.md | 4 ++++ README.md | 2 +- version.sbt | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) 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 a121eac36..7b20212ed 100644 --- a/README.md +++ b/README.md @@ -134,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/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" From 6d1d5b9a284d30689e0ac6d9d6fdbe0ffb9754c9 Mon Sep 17 00:00:00 2001 From: Alex Levenson Date: Fri, 16 Jan 2015 16:22:00 -0800 Subject: [PATCH 5/5] Update scala 2.11 version to 2.11.5 --- project/Build.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,