milleruntime commented on a change in pull request #2273:
URL: https://github.com/apache/accumulo/pull/2273#discussion_r711223448
##########
File path:
core/src/main/java/org/apache/accumulo/core/util/ThriftMessageUtil.java
##########
@@ -42,18 +42,14 @@
private final TMemoryInputTransport inputTransport;
private final TCompactProtocol inputProtocol;
- public ThriftMessageUtil() {
- this(64);
- }
-
- public ThriftMessageUtil(int initialCapacity) {
+ public ThriftMessageUtil() throws IOException {
// TODO does this make sense? better to push this down to the serialize
method (accept the
// transport as an argument)?
- this.initialCapacity = initialCapacity;
+ this.initialCapacity = 64;
try {
this.inputTransport = new TMemoryInputTransport();
} catch (TTransportException e) {
- throw new RuntimeException(e);
+ throw new IOException(e);
Review comment:
Yeah. I went with whichever type the calling method handled. Here it
handled IOException. It is used by `AuthenticationTokenIdentifier` and
`AuthenticationKey` in their respective `write()` and `readFields()` methods,
both of which throw IOException.
The other place I threw TTransportException since the calling methods where
already catching IOException and throwing TTransportException.
--
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]