In method handle() of class BaseValueHandler, when IOException happend, the exception is not point out explicitly, so I think like this:
public abstract class BaseValueHandler<T> implements IValueHandler<T> {
@Override
public void handle(DataOutputStream buffer, final T value) {
try {
if (value == null) {
buffer.writeInt(-1);
return;
}
internalHandle(buffer, value);
} catch (Exception e) {
if (e instanceof IOException) {
if (null != e.getCause()) {
throw new BinaryWriteFailedException(e.getCause());
}
} else {
throw new BinaryWriteFailedException(e);
}
}
}
protected abstract void internalHandle(DataOutputStream buffer, final T value) throws Exception;
}
do you agree with me? thanks!
In method handle() of class BaseValueHandler, when IOException happend, the exception is not point out explicitly, so I think like this:
do you agree with me? thanks!