cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marc...@apache.org
Subject cassandra git commit: Close DataInputBuffer to silence eclipse-warnings
Date Wed, 08 Nov 2017 15:29:50 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 65ff3e6d9 -> 6186ad97a


Close DataInputBuffer to silence eclipse-warnings

Patch by marcuse; reviewed by Jason Brown for CASSANDRA-13996


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/6186ad97
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/6186ad97
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/6186ad97

Branch: refs/heads/trunk
Commit: 6186ad97a8239c9062363c2a4a23cf31c4e6e3c2
Parents: 65ff3e6
Author: Marcus Eriksson <marcuse@apache.org>
Authored: Mon Nov 6 10:46:07 2017 +0100
Committer: Marcus Eriksson <marcuse@apache.org>
Committed: Wed Nov 8 16:26:33 2017 +0100

----------------------------------------------------------------------
 .../cassandra/io/sstable/metadata/MetadataSerializer.java      | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/6186ad97/src/java/org/apache/cassandra/io/sstable/metadata/MetadataSerializer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/io/sstable/metadata/MetadataSerializer.java b/src/java/org/apache/cassandra/io/sstable/metadata/MetadataSerializer.java
index 9499ff3..c1bbeb0 100644
--- a/src/java/org/apache/cassandra/io/sstable/metadata/MetadataSerializer.java
+++ b/src/java/org/apache/cassandra/io/sstable/metadata/MetadataSerializer.java
@@ -195,8 +195,10 @@ public class MetadataSerializer implements IMetadataSerializer
 
             crc.reset(); crc.update(buffer);
             maybeValidateChecksum(crc, in, descriptor);
-
-            components.put(type, type.serializer.deserialize(descriptor.version, new DataInputBuffer(buffer)));
+            try (DataInputBuffer dataInputBuffer = new DataInputBuffer(buffer))
+            {
+                components.put(type, type.serializer.deserialize(descriptor.version, dataInputBuffer));
+            }
         }
 
         return components;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message