samueldlightfoot commented on code in PR #4536:
URL: https://github.com/apache/cassandra/pull/4536#discussion_r2637281824


##########
src/java/org/apache/cassandra/db/marshal/AbstractType.java:
##########
@@ -585,6 +585,25 @@ public  <V> void writeValue(V value, ValueAccessor<V> 
accessor, DataOutputPlus o
         }
     }
 
+    public  <V> void writeValue(IndexedValueHolder<V> valueHolder, int i, 
ValueAccessor<V> accessor, DataOutputPlus out) throws IOException
+    {
+        assert !valueHolder.isNull(i) : "bytes should not be null for type " + 
this;
+        int expectedValueLength = valueLengthIfFixed();
+        if (expectedValueLength >= 0)
+        {
+            int actualValueLength = valueHolder.size(i);
+            if (actualValueLength == expectedValueLength)
+                accessor.write(valueHolder, i, out);
+            else
+                throw new IOException(String.format("Expected exactly %d 
bytes, but was %d",
+                                                    expectedValueLength, 
actualValueLength));
+        }
+        else
+        {;

Review Comment:
   nit: can remove the semicolon



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to