sdl_java_suite
sdl_java_suite copied to clipboard
ByteEnumer Legacy Method?
com/smartdevicelink/util/ByteEnumer
In the ByteEnumer class the following two methods are redundant, but I am wondering if they are there as legacy code?
public boolean equals(ByteEnumer other) {
return name == other.getName();
}
public boolean eq(ByteEnumer other) { // Legacy?
return equals(other);
}
public byte getValue() { return value; }
public byte value() { // Legacy?
return value;
}
If it is legacy code intended to support library developers then the eq(ByteEnumer)
method should be deprecated and documented, but this method should not be used within library; it is currently seen in WiProProtocol and SdlProxyBase, but so is the replacement method equals(ByteEnumer)
which causes an inconsistency and should be adjusted.
The value()
method should also be deprecated and documented and it's use in the library replaced with the new method. Currently the method appears in the ProtocolFrameHeader and ProtocolFrameHeaderFactory classes. The replacement method is used in SdlTrace and WiProProtocol which causes a similar library inconsistency as seen before.
@mrapitis
This can become obsolete if #209 is merged.
The methods should be marked as deprecated for 4.0.0