Closed
Description
Please cleanup the SBE generated Java code. Here is SBE-generated snippet of code:
public SetFileAttributesEncoder putPath(final DirectBuffer src, final int srcOffset, final int length)
{
if (length > 1073741824)
{
throw new IllegalStateException("length > maxValue for type: " + length);
}
final int headerLength = 4;
final int limit = parentMessage.limit();
parentMessage.limit(limit + headerLength + length);
buffer.putInt(limit, (int)length, java.nio.ByteOrder.LITTLE_ENDIAN);
buffer.putBytes(limit + headerLength, src, srcOffset, length);
return this;
}
To which the Java compiler says:
..../hasql/message/src/main/java/dynamind/hasql/message/SetFileAttributesEncoder.java:215: warning: [cast] redundant cast to int
buffer.putInt(limit, (int)length, java.nio.ByteOrder.LITTLE_ENDIAN);
This is very irritating because it is outside the developer's control, pollutes reports and CI builds.